Module: Videojuicer::Promo::Base::InstanceMethods

Defined in:
lib/videojuicer/promo/base.rb

Instance Method Summary collapse

Instance Method Details

#assetObject



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

Raises:

  • (NoMethodError)


40
# File 'lib/videojuicer/promo/base.rb', line 40

def destroy(*args); raise NoMethodError; end

#matcher_attributesObject



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_keysObject



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

Raises:

  • (NoMethodError)


39
# File 'lib/videojuicer/promo/base.rb', line 39

def save(*args); raise NoMethodError; end