Class: Utopia::Tags::Gallery::Metadata
- Inherits:
-
Object
- Object
- Utopia::Tags::Gallery::Metadata
- 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) ⇒ Metadata
constructor
A new instance of Metadata.
- #to_html ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(metadata) ⇒ Metadata
Returns a new instance of Metadata.
28 29 30 |
# File 'lib/utopia/tags/gallery.rb', line 28 def initialize() @metadata = end |
Instance Attribute Details
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
32 33 34 |
# File 'lib/utopia/tags/gallery.rb', line 32 def @metadata end |
Instance Method Details
#[](key) ⇒ Object
34 35 36 |
# File 'lib/utopia/tags/gallery.rb', line 34 def [] (key) @metadata[key.to_s] end |
#to_html ⇒ Object
42 43 44 |
# File 'lib/utopia/tags/gallery.rb', line 42 def to_html to_s.to_html end |
#to_s ⇒ Object
38 39 40 |
# File 'lib/utopia/tags/gallery.rb', line 38 def to_s @metadata['caption'] || '' end |