Class: Hokusai::Mounting::LoopContext
- Inherits:
-
Object
- Object
- Hokusai::Mounting::LoopContext
- Defined in:
- ui/src/hokusai/mounting/loop_entry.rb
Instance Attribute Summary collapse
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #add_entry(var, value) ⇒ Object
-
#initialize ⇒ LoopContext
constructor
A new instance of LoopContext.
- #send_target(target, func) ⇒ Object
Constructor Details
#initialize ⇒ LoopContext
Returns a new instance of LoopContext.
8 9 10 |
# File 'ui/src/hokusai/mounting/loop_entry.rb', line 8 def initialize @table = {} end |
Instance Attribute Details
#table ⇒ Object (readonly)
Returns the value of attribute table.
7 8 9 |
# File 'ui/src/hokusai/mounting/loop_entry.rb', line 7 def table @table end |
Instance Method Details
#add_entry(var, value) ⇒ Object
12 13 14 |
# File 'ui/src/hokusai/mounting/loop_entry.rb', line 12 def add_entry(var, value) table[var] = value end |
#send_target(target, func) ⇒ Object
16 17 18 19 20 21 22 |
# File 'ui/src/hokusai/mounting/loop_entry.rb', line 16 def send_target(target, func) args = func.args.map do |arg| table[arg] end target.public_send(func.method, *args) end |