Sha256: eb49e1604363397dac90bb6c09622b59c712167e153f28deae000db592b239b6

Contents?: true

Size: 798 Bytes

Versions: 1

Compression:

Stored size: 798 Bytes

Contents

require "sourcerer"

def test var, opts={}, *args, &block
  puts var
  if true

  end
end

asdf= lambda{

  puts "hy"

}

asd = Proc.new { |var, opts={}, *args, &block|

  puts "WHAAAAAAAAAT?"

  puts opts.inspect

}

puts asdf.source
puts asd.source
puts method(:test).source


#> output
test= Proc.new do |sym,options={},*params,&block|

  puts "some awsome code here"  # comment
  puts "yo"

end # Proc

puts test.source
# Proc.new { |sym,options={},*params,&block|
#
#   puts "some awsome code here"
#   puts "yo"
#
# }


class HelloWorld

  #> TODO: comment remove from args
  def self.hello sym,sym2= "#{sym}", options={},*params,&block

    [1,2,3].each do |do_|

      puts do_    # comment

    end

    puts "some code" # some comment

  end

end

puts HelloWorld.method(:hello).source

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sourcerer-0.6.0 test/test.rb