Class: JavaScript::BoundFunction
- Defined in:
- lib/javascript.rb
Instance Attribute Summary
Attributes inherited from Function
Instance Method Summary collapse
- #apply(_, arg_values) ⇒ Object
- #bind(_) ⇒ Object
- #call(_, *arg_values) ⇒ Object
-
#initialize(target, name, args, body) ⇒ BoundFunction
constructor
A new instance of BoundFunction.
Methods inherited from Function
Constructor Details
#initialize(target, name, args, body) ⇒ BoundFunction
Returns a new instance of BoundFunction.
276 277 278 279 |
# File 'lib/javascript.rb', line 276 def initialize(target, name, args, body) super(name, args, body) @target = target end |
Instance Method Details
#apply(_, arg_values) ⇒ Object
285 286 287 |
# File 'lib/javascript.rb', line 285 def apply(_, arg_values) super(@target, arg_values) end |
#bind(_) ⇒ Object
289 290 291 |
# File 'lib/javascript.rb', line 289 def bind(_) self end |
#call(_, *arg_values) ⇒ Object
281 282 283 |
# File 'lib/javascript.rb', line 281 def call(_, *arg_values) super(@target, *arg_values) end |