Class: Cure::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/cure/template/template.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dispatchObject

Parameters:



16
17
18
# File 'lib/cure/template/template.rb', line 16

def dispatch
  @dispatch
end

#extractionObject

Parameters:



13
14
15
# File 'lib/cure/template/template.rb', line 13

def extraction
  @extraction
end

#transformationsObject

Parameters:



10
11
12
# File 'lib/cure/template/template.rb', line 10

def transformations
  @transformations
end

Class Method Details

.from_hash(hash) ⇒ Cure::Template

Parameters:

  • hash (Hash)

Returns:



20
21
22
23
24
25
26
# File 'lib/cure/template/template.rb', line 20

def self.from_hash(hash)
  this = Cure::Template.new
  this.transformations = Cure::Transformations.from_hash(hash.fetch("transformations", {}))
  this.extraction = Cure::Extraction.from_hash(hash.fetch("extraction", {}))
  this.dispatch = Cure::Dispatch.from_hash(hash.fetch("dispatch", {}))
  this
end