Class: CMSBinding::ArticleAttachment

Inherits:
Object
  • Object
show all
Defined in:
lib/twm-cms-bindings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attachment_dom, source) ⇒ ArticleAttachment

Returns a new instance of ArticleAttachment.



116
117
118
119
120
121
122
# File 'lib/twm-cms-bindings.rb', line 116

def initialize(attachment_dom, source)
  @source = source
  
  @id = attachment_dom.attributes['id'].to_str
  @mime_type = attachment_dom.attributes['mimetype'].to_str
  @filename = attachment_dom.attributes['filename'].to_str
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



114
115
116
# File 'lib/twm-cms-bindings.rb', line 114

def filename
  @filename
end

#idObject (readonly)

Returns the value of attribute id.



114
115
116
# File 'lib/twm-cms-bindings.rb', line 114

def id
  @id
end

#mime_typeObject (readonly)

Returns the value of attribute mime_type.



114
115
116
# File 'lib/twm-cms-bindings.rb', line 114

def mime_type
  @mime_type
end