Class: EmbedAsset

Inherits:
Asset show all
Defined in:
lib/embed_asset.rb

Instance Attribute Summary collapse

Attributes inherited from Asset

#description, #title

Attributes inherited from RestfulModel

#_id, #created_at

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Asset

#as_json

Methods inherited from RestfulModel

#==, #as_json, #inflate, #path, #save!, #update

Constructor Details

#initialize(parent, source_html, title = nil, description = nil) ⇒ EmbedAsset

as an alternative to calling Asset.new, you can call populr.images.build



12
13
14
15
16
17
18
# File 'lib/embed_asset.rb', line 12

def initialize(parent, source_html, title = nil, description = nil)
  super(parent, nil)

  @source_html = source_html
  self.title = title
  self.description = description
end

Instance Attribute Details

#source_htmlObject

Returns the value of attribute source_html.



5
6
7
# File 'lib/embed_asset.rb', line 5

def source_html
  @source_html
end

Class Method Details

.collection_nameObject



7
8
9
# File 'lib/embed_asset.rb', line 7

def self.collection_name
  "embeds"
end