Class: Riddler::Elements::Copy

Inherits:
Riddler::Element show all
Defined in:
lib/riddler/elements/copy.rb

Instance Attribute Summary

Attributes inherited from Riddler::Element

#context, #definition

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Riddler::Element

for, inherited, #initialize, subclasses

Methods included from Includeable

#include?, #include_predicate

Constructor Details

This class inherits a constructor from Riddler::Element

Class Method Details

.typeObject



5
6
7
# File 'lib/riddler/elements/copy.rb', line 5

def self.type
  "copy"
end

Instance Method Details

#textObject



9
10
11
# File 'lib/riddler/elements/copy.rb', line 9

def text
  context.render definition["text"]
end

#to_hashObject



13
14
15
# File 'lib/riddler/elements/copy.rb', line 13

def to_hash
  super.merge text: text
end