Class: Tupelo::Client::Or
Instance Attribute Summary collapse
-
#templates ⇒ Object
readonly
Returns the value of attribute templates.
Instance Method Summary collapse
- #===(obj) ⇒ Object
-
#initialize(worker, templates) ⇒ Or
constructor
A new instance of Or.
Constructor Details
#initialize(worker, templates) ⇒ Or
Returns a new instance of Or.
5 6 7 |
# File 'lib/tupelo/util/boolean.rb', line 5 def initialize worker, templates @templates = templates.map {|template| worker.make_template(template)} end |
Instance Attribute Details
#templates ⇒ Object (readonly)
Returns the value of attribute templates.
3 4 5 |
# File 'lib/tupelo/util/boolean.rb', line 3 def templates @templates end |
Instance Method Details
#===(obj) ⇒ Object
9 10 11 |
# File 'lib/tupelo/util/boolean.rb', line 9 def === obj templates.any? {|template| template === obj} end |