Class: Volute::Target
- Inherits:
-
Object
- Object
- Volute::Target
- Defined in:
- lib/volute.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#previous_value ⇒ Object
readonly
Returns the value of attribute previous_value.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(object, attribute, previous_value, value) ⇒ Target
constructor
A new instance of Target.
- #over ⇒ Object
- #volute(*args, &block) ⇒ Object
Constructor Details
#initialize(object, attribute, previous_value, value) ⇒ Target
Returns a new instance of Target.
171 172 173 174 175 176 177 178 179 |
# File 'lib/volute.rb', line 171 def initialize(object, attribute, previous_value, value) @object = object @attribute = attribute @previous_value = previous_value @value = value @over = false end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
169 170 171 |
# File 'lib/volute.rb', line 169 def attribute @attribute end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
169 170 171 |
# File 'lib/volute.rb', line 169 def object @object end |
#previous_value ⇒ Object (readonly)
Returns the value of attribute previous_value.
169 170 171 |
# File 'lib/volute.rb', line 169 def previous_value @previous_value end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
169 170 171 |
# File 'lib/volute.rb', line 169 def value @value end |
Instance Method Details
#over ⇒ Object
191 192 193 194 |
# File 'lib/volute.rb', line 191 def over @over = true end |
#volute(*args, &block) ⇒ Object
181 182 183 184 185 186 187 188 189 |
# File 'lib/volute.rb', line 181 def volute(*args, &block) return if @over match = (args.first == :not) ? ( ! match?(args[1..-1])) : match?(args) return unless match self.instance_eval(&block) end |