Class: Oos4ruby::Media
- Inherits:
-
Bean::BeanClass
- Object
- Bean::BeanClass
- Oos4ruby::Media
- Includes:
- Bean
- Defined in:
- lib/oos4ruby/media.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
writeonly
Sets the attribute title.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(entry, auth, slug = nil) ⇒ Media
constructor
A new instance of Media.
Methods included from Bean
Methods inherited from Bean::BeanClass
#author, #contains?, #delete!, #to_s, #to_xml, #update!
Constructor Details
#initialize(entry, auth, slug = nil) ⇒ Media
Returns a new instance of Media.
10 11 12 13 14 |
# File 'lib/oos4ruby/media.rb', line 10 def initialize(entry, auth, slug = nil) @xml = entry @auth = auth @slug = slug || @xml.child('slug', OosNamespace).text end |
Instance Attribute Details
#title=(value) ⇒ Object (writeonly)
Sets the attribute title
8 9 10 |
# File 'lib/oos4ruby/media.rb', line 8 def title=(value) @title = value end |
Class Method Details
.dump!(opts, slug) ⇒ Object
16 17 18 19 |
# File 'lib/oos4ruby/media.rb', line 16 def Media.dump!(opts, slug) file = opts.delete(:file) file.respond_to?(:path) ? file : File.new(file) end |