Class: Erlectricity::TypeCondition
- Defined in:
- lib/erlectricity/conditions/type.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #binding_for(arg) ⇒ Object
-
#initialize(type) ⇒ TypeCondition
constructor
A new instance of TypeCondition.
- #satisfies?(arg) ⇒ Boolean
Methods inherited from Condition
Constructor Details
#initialize(type) ⇒ TypeCondition
Returns a new instance of TypeCondition.
5 6 7 |
# File 'lib/erlectricity/conditions/type.rb', line 5 def initialize(type) self.type = type end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/erlectricity/conditions/type.rb', line 3 def type @type end |
Instance Method Details
#binding_for(arg) ⇒ Object
13 14 15 |
# File 'lib/erlectricity/conditions/type.rb', line 13 def binding_for(arg) arg end |
#satisfies?(arg) ⇒ Boolean
9 10 11 |
# File 'lib/erlectricity/conditions/type.rb', line 9 def satisfies?(arg) arg.is_a?(self.type) end |