Module: Videojuicer::Promo::Base::InstanceMethods
- Defined in:
- lib/videojuicer/promo/base.rb
Instance Method Summary collapse
- #asset ⇒ Object
- #destroy(*args) ⇒ Object
- #matcher_attributes ⇒ Object
- #matcher_keys ⇒ Object
- #save(*args) ⇒ Object
Instance Method Details
#asset ⇒ Object
41 42 43 |
# File 'lib/videojuicer/promo/base.rb', line 41 def asset Videojuicer::Asset.const_get(self.class.to_s.split("::").last).get(asset_id) end |
#destroy(*args) ⇒ Object
40 |
# File 'lib/videojuicer/promo/base.rb', line 40 def destroy(*args); raise NoMethodError; end |
#matcher_attributes ⇒ Object
47 48 49 50 51 |
# File 'lib/videojuicer/promo/base.rb', line 47 def matcher_attributes matcher_keys.inject({}) do |memo, attr| memo.update(attr => self.send(attr)) end end |
#matcher_keys ⇒ Object
44 45 46 |
# File 'lib/videojuicer/promo/base.rb', line 44 def matcher_keys [:campaign_policy_id, :asset_id, :role, :href] end |
#save(*args) ⇒ Object
39 |
# File 'lib/videojuicer/promo/base.rb', line 39 def save(*args); raise NoMethodError; end |