Class: Utopia::Tags::Gallery::ImageMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/utopia/tags/gallery.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#metadataObject (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_htmlObject

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_sObject



155
156
157
# File 'lib/utopia/tags/gallery.rb', line 155

def to_s
	@metadata['caption'] || ''
end