Class: ExAequo::Base::Function
- Inherits:
-
Object
- Object
- ExAequo::Base::Function
- Extended by:
- ClassMethods
- Includes:
- CombinatorMethods
- Defined in:
- lib/ex_aequo/base/function.rb,
lib/ex_aequo/base/function/class_methods.rb,
lib/ex_aequo/base/function/combinator_methods.rb
Defined Under Namespace
Modules: ClassMethods, CombinatorMethods
Instance Attribute Summary collapse
-
#arity ⇒ Object
readonly
Returns the value of attribute arity.
-
#function ⇒ Object
readonly
Returns the value of attribute function.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
Methods included from ClassMethods
Instance Attribute Details
#arity ⇒ Object (readonly)
Returns the value of attribute arity.
9 10 11 |
# File 'lib/ex_aequo/base/function.rb', line 9 def arity @arity end |
#function ⇒ Object (readonly)
Returns the value of attribute function.
9 10 11 |
# File 'lib/ex_aequo/base/function.rb', line 9 def function @function end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/ex_aequo/base/function.rb', line 9 def name @name end |
Instance Method Details
#call(*args, **kwds, &blk) ⇒ Object
11 12 13 14 15 |
# File 'lib/ex_aequo/base/function.rb', line 11 def call(*args, **kwds, &blk) function.(*args, **kwds, &blk) rescue StandardError => e raise(e, e. + " in #{name}") end |
#named(name) ⇒ Object
17 18 19 20 |
# File 'lib/ex_aequo/base/function.rb', line 17 def named(name) @name = name self end |
#to_proc ⇒ Object
22 |
# File 'lib/ex_aequo/base/function.rb', line 22 def to_proc = function |
#to_s ⇒ Object
24 |
# File 'lib/ex_aequo/base/function.rb', line 24 def to_s = name |