Class: Utopia::Tags::Gallery::Metadata

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

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



42
43
44
# File 'lib/utopia/tags/gallery.rb', line 42

def to_html
	to_s.to_html
end

#to_sObject



38
39
40
# File 'lib/utopia/tags/gallery.rb', line 38

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