Class: Luoma::PredicateFunction
- Inherits:
-
Object
- Object
- Luoma::PredicateFunction
- Defined in:
- lib/luoma/expression.rb,
sig/luoma/expression.rbs
Instance Attribute Summary collapse
-
#func ⇒ Object
readonly
Returns the value of attribute func.
-
#name ⇒ String
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#call(context, obj) ⇒ Boolean
(RenderContext, untyped) -> bool.
-
#initialize(name, func) ⇒ PredicateFunction
constructor
(String, untyped) -> void.
Constructor Details
#initialize(name, func) ⇒ PredicateFunction
(String, untyped) -> void
1148 1149 1150 1151 |
# File 'lib/luoma/expression.rb', line 1148 def initialize(name, func) @name = name @func = func end |
Instance Attribute Details
#func ⇒ Object (readonly)
Returns the value of attribute func.
1145 1146 1147 |
# File 'lib/luoma/expression.rb', line 1145 def func @func end |
#name ⇒ String (readonly)
Returns the value of attribute name.
1145 1146 1147 |
# File 'lib/luoma/expression.rb', line 1145 def name @name end |
Instance Method Details
#call(context, obj) ⇒ Boolean
(RenderContext, untyped) -> bool
1154 1155 1156 |
# File 'lib/luoma/expression.rb', line 1154 def call(context, obj) @func.call(context, obj) end |