Title / Description
Code h = Hash[:key1, 'value1', :key2, 'value2'] h = {key1 : ‘value1’, key2 : ‘value2’} a = Array.new(); a << 1; a << 2; a = [0,2,3] class SomeClass # ... end SomeClass = Class.new do # ... end class MyHash < Hash # ... end MyHash = Class.new(MyHash) do # ... end module SomeModule def some_method end end SomeModule = Module.new do def module_method end end class A def some_method(arg1, arg2) # ... doing some stuff end define_method(:some_method) do |arg1, arg2| # ... doing some stuff end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code