Class: Walt::Operation::Base

Inherits:
Object
  • Object
show all
Extended by:
Support::AttrDefault
Defined in:
lib/walt/operation/base.rb

Constant Summary collapse

PROPERTIES =
[:id, :type]

Instance Method Summary collapse

Methods included from Support::AttrDefault

attr_default

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