Class: Walt::Operation::Base
- Inherits:
-
Object
- Object
- Walt::Operation::Base
- Extended by:
- Support::AttrDefault
- Defined in:
- lib/walt/operation/base.rb
Direct Known Subclasses
FadeOperation, MoveOperation, RotateOperation, ScaleOperation
Constant Summary collapse
- PROPERTIES =
[:id, :type]
Instance Method Summary collapse
- #finalize(view, animation = nil) ⇒ Object
-
#initialize(params = {}) ⇒ Base
constructor
A new instance of Base.
- #setup(view, animation) ⇒ Object
Methods included from Support::AttrDefault
Constructor Details
#initialize(params = {}) ⇒ Base
Returns a new instance of Base.
18 19 20 21 22 23 24 |
# File 'lib/walt/operation/base.rb', line 18 def initialize(params = {}) params.each do |key, value| if PROPERTIES.include?(key.to_sym) self.send("#{key}=", value) end end end |
Instance Method Details
#finalize(view, animation = nil) ⇒ Object
30 31 32 |
# File 'lib/walt/operation/base.rb', line 30 def finalize(view, animation = nil) # do whatever occurs during the animation end |
#setup(view, animation) ⇒ Object
26 27 28 |
# File 'lib/walt/operation/base.rb', line 26 def setup(view, animation) # do initial before animation end |