Class: TaggedImage
- Inherits:
-
TaggedFile
- Object
- TaggedFile
- TaggedImage
- Includes:
- Logging
- Defined in:
- lib/flickrup/filetype/tagged_image.rb
Constant Summary collapse
- TYPE =
'image'
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#[](tag) ⇒ Object
Returns the value of a tag.
-
#[]=(tag, val) ⇒ Object
Set the value of a tag.
-
#initialize(filename) ⇒ TaggedImage
constructor
A new instance of TaggedImage.
- #post_upload ⇒ Object
- #pre_upload ⇒ Object
- #type ⇒ Object
Methods included from Logging
Methods inherited from TaggedFile
#archive, create, #date_created, #doUpload, register_reader, #tags
Constructor Details
#initialize(filename) ⇒ TaggedImage
Returns a new instance of TaggedImage.
14 15 16 17 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 14 def initialize(filename) super @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
12 13 14 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 12 def filename @filename end |
Instance Method Details
#[](tag) ⇒ Object
Returns the value of a tag.
36 37 38 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 36 def [] tag @parsed[tag] end |
#[]=(tag, val) ⇒ Object
Set the value of a tag.
41 42 43 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 41 def []=(tag, val) @parsed[tag] = val end |
#post_upload ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 27 def post_upload super #maybe save afterwards if @parsed.changed? @parsed.save! end end |
#pre_upload ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 19 def pre_upload super #maybe save afterwards if @parsed.changed? @parsed.save! end end |
#type ⇒ Object
45 46 47 |
# File 'lib/flickrup/filetype/tagged_image.rb', line 45 def type TYPE end |