Class: Riddler::Elements::Image
Instance Attribute Summary
#context, #definition
Class Method Summary
collapse
Instance Method Summary
collapse
for, inherited, #initialize, subclasses
#include?, #include_predicate
Class Method Details
.type ⇒ Object
4
5
6
|
# File 'lib/riddler/elements/image.rb', line 4
def self.type
"image"
end
|
Instance Method Details
#alt ⇒ Object
12
13
14
|
# File 'lib/riddler/elements/image.rb', line 12
def alt
context.render definition["alt"]
end
|
#src ⇒ Object
8
9
10
|
# File 'lib/riddler/elements/image.rb', line 8
def src
context.render definition["src"]
end
|
#to_hash ⇒ Object
16
17
18
|
# File 'lib/riddler/elements/image.rb', line 16
def to_hash
super.merge alt: alt, src: src
end
|