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.
145 146 147 |
# File 'lib/utopia/tags/gallery.rb', line 145 def initialize() @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
149 150 151 |
# File 'lib/utopia/tags/gallery.rb', line 149 def @metadata end |
Instance Method Details
#[](key) ⇒ Object
151 152 153 |
# File 'lib/utopia/tags/gallery.rb', line 151 def [] (key) @metadata[key.to_s] end |
#to_html ⇒ Object
A bit of a hack to ease migration.
160 161 162 |
# File 'lib/utopia/tags/gallery.rb', line 160 def to_html to_s.to_html end |
#to_s ⇒ Object
155 156 157 |
# File 'lib/utopia/tags/gallery.rb', line 155 def to_s @metadata['caption'] || '' end |