Class: Erlectricity::Condition
- Inherits:
-
Object
- Object
- Erlectricity::Condition
- Defined in:
- lib/erlectricity/condition.rb
Direct Known Subclasses
BooleanCondition, HashCondition, StaticCondition, TypeCondition
Class Method Summary collapse
Instance Method Summary collapse
- #binding_for(arg) ⇒ Object
-
#initialize ⇒ Condition
constructor
A new instance of Condition.
- #satisfies?(arg) ⇒ Boolean (also: #===)
Constructor Details
#initialize ⇒ Condition
Returns a new instance of Condition.
11 12 |
# File 'lib/erlectricity/condition.rb', line 11 def initialize end |
Class Method Details
.for(a) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/erlectricity/condition.rb', line 3 def self.for(a) case a when Condition then a when Class then TypeCondition.new(a) else StaticCondition.new(a) end end |
Instance Method Details
#binding_for(arg) ⇒ Object
14 15 16 |
# File 'lib/erlectricity/condition.rb', line 14 def binding_for(arg) nil end |
#satisfies?(arg) ⇒ Boolean Also known as: ===
18 19 20 |
# File 'lib/erlectricity/condition.rb', line 18 def satisfies?(arg) false end |