Class: Brujula::Parameters::Transformer

Inherits:
Object
  • Object
show all
Defined in:
lib/brujula/parameters/transformer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parameters:) ⇒ Transformer

Returns a new instance of Transformer.



7
8
9
# File 'lib/brujula/parameters/transformer.rb', line 7

def initialize(parameters:)
  @parameters = parameters
end

Instance Attribute Details

#parametersObject (readonly)

Returns the value of attribute parameters.



5
6
7
# File 'lib/brujula/parameters/transformer.rb', line 5

def parameters
  @parameters
end

Instance Method Details

#call(string) ⇒ Object



11
12
13
14
15
# File 'lib/brujula/parameters/transformer.rb', line 11

def call(string)
  content = string.match(/<<(.*?)>>/)[1]

  apply_functions(content)
end