Class: Utopia::Tags::Gallery::ImageMetadata
- Inherits:
-
Object
- Object
- Utopia::Tags::Gallery::ImageMetadata
- Defined in:
- lib/utopia/tags/gallery.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(metadata) ⇒ ImageMetadata
constructor
A new instance of ImageMetadata.
-
#to_html ⇒ Object
A bit of a hack to ease migration.
- #to_s ⇒ Object
Constructor Details
#initialize(metadata) ⇒ ImageMetadata
Returns a new instance of ImageMetadata.
161 162 163 |
# File 'lib/utopia/tags/gallery.rb', line 161 def initialize() @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
165 166 167 |
# File 'lib/utopia/tags/gallery.rb', line 165 def @metadata end |
Instance Method Details
#[](key) ⇒ Object
167 168 169 |
# File 'lib/utopia/tags/gallery.rb', line 167 def [] (key) @metadata[key.to_s] end |
#to_html ⇒ Object
A bit of a hack to ease migration.
176 177 178 |
# File 'lib/utopia/tags/gallery.rb', line 176 def to_html to_s.to_html end |
#to_s ⇒ Object
171 172 173 |
# File 'lib/utopia/tags/gallery.rb', line 171 def to_s @metadata['caption'] || '' end |