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.



161
162
163
# File 'lib/utopia/tags/gallery.rb', line 161

def initialize()
	@metadata = 
end

Instance Attribute Details

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

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_sObject



171
172
173
# File 'lib/utopia/tags/gallery.rb', line 171

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