Class: Ludy::Variable

Inherits:
Object
  • Object
show all
Defined in:
lib/ludy/variable.rb

Overview

a variable reference, used for side effect…

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Variable

init the refered instance



12
13
14
# File 'lib/ludy/variable.rb', line 12

def initialize obj
  @__obj__ = obj
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(msg, *arg, &block) ⇒ Object

delegator



17
18
19
# File 'lib/ludy/variable.rb', line 17

def method_missing msg, *arg, &block
  @__obj__.public_send msg, *arg, &block
end

Instance Attribute Details

#__obj__Object

Returns the value of attribute __obj__.



21
22
23
# File 'lib/ludy/variable.rb', line 21

def __obj__
  @__obj__
end