Method: Walt::AnimationSet#assets=

Defined in:
lib/walt/animation_set.rb

#assets=(assets) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/walt/animation_set.rb', line 42

def assets=(assets)
  _assets = assets && assets.collect do |asset|
    case asset
    when Walt::Asset
      asset
    when NSDictionary
      Walt::Asset.for(asset)
    when UIView
      Walt::Asset.for(asset)
    else
      raise "Invalid class for asset #{asset.inspect}"
    end
    asset
  end
  @assets = _assets
end