1993

2004

1999

1995

2003

2010

2005
(http://jruby.codehaus.org/)
JVM)
(http://www.ironruby.net/)
…
●

○
○
○
●
- BINDING:
def binding_elsewhere
x = 20
return binding
end
remote_binding = binding_elsewhere
x = 10
eval("puts x")
eval("...
Reflection:
class Person
end
def add_accessor_to_person(accessor_name)
Person.class_eval %Q{
attr_accessor :#{accessor_nam...
-Efficiency ?
- Isn’t widely used in Industry except for web apps
- Not Powerful as python ( Not biased :P )
Programming Language: Ruby
Programming Language: Ruby
Programming Language: Ruby
Programming Language: Ruby
Programming Language: Ruby
Programming Language: Ruby
Upcoming SlideShare
Loading in …5
×

Programming Language: Ruby

195 views
144 views

Published on

Programming Language: Ruby

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
195
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Programming Language: Ruby

  1. 1. 1993 2004 1999 1995 2003 2010 2005
  2. 2. (http://jruby.codehaus.org/) JVM) (http://www.ironruby.net/)
  3. 3. … ● ○ ○ ○ ●
  4. 4. - BINDING: def binding_elsewhere x = 20 return binding end remote_binding = binding_elsewhere x = 10 eval("puts x") eval("puts x", remote_binding)
  5. 5. Reflection: class Person end def add_accessor_to_person(accessor_name) Person.class_eval %Q{ attr_accessor :#{accessor_name} } end irb>> person = Person.new irb>> add_accessor_to_person :name irb>> add_accessor_to_person :gender irb>> person.name = "Peter Cooper" irb>> person.gender = "male" irb>> puts "#{person.name} is #{person.gender}" --------------------------------------------class MyClass def initialize @my_variable = 'Hello, world!' end end obj = MyClass.new obj.instance_eval { puts @my_variable }
  6. 6. -Efficiency ? - Isn’t widely used in Industry except for web apps - Not Powerful as python ( Not biased :P )

×