Class: Aquel::Attribute
- Inherits:
-
Object
- Object
- Aquel::Attribute
- Defined in:
- lib/aquel/attribute.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(options) ⇒ Attribute
constructor
A new instance of Attribute.
- #operate(target) ⇒ Object
Constructor Details
#initialize(options) ⇒ Attribute
Returns a new instance of Attribute.
5 6 7 8 |
# File 'lib/aquel/attribute.rb', line 5 def initialize() @name = [:name] @value = [:value] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/aquel/attribute.rb', line 3 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
3 4 5 |
# File 'lib/aquel/attribute.rb', line 3 def value @value end |
Instance Method Details
#operate(target) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/aquel/attribute.rb', line 10 def operate(target) case name when '=' target == value when '<>' target != value else false end end |