Class: Animoto::Assets::Base Abstract
- Inherits:
-
Object
- Object
- Animoto::Assets::Base
- Defined in:
- lib/animoto/assets/base.rb
Overview
This class is abstract.
Instance Attribute Summary collapse
-
#source ⇒ String
The URL of this asset.
Instance Method Summary collapse
-
#initialize(source, options = {}) ⇒ Assets::Base
constructor
Creates a new asset.
-
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this asset as a Hash.
Constructor Details
#initialize(source, options = {}) ⇒ Assets::Base
Creates a new asset.
16 17 18 |
# File 'lib/animoto/assets/base.rb', line 16 def initialize source, = {} @source = source end |
Instance Attribute Details
#source ⇒ String
The URL of this asset.
9 10 11 |
# File 'lib/animoto/assets/base.rb', line 9 def source @source end |
Instance Method Details
#to_hash ⇒ Hash{String=>Object}
Returns a representation of this asset as a Hash. Used mainly for generating manifests.
24 25 26 |
# File 'lib/animoto/assets/base.rb', line 24 def to_hash { 'source_url' => @source, 'type' => self.class.name.split('::').last.underscore } end |