Class: Brujula::Parameters::Transformer
- Inherits:
-
Object
- Object
- Brujula::Parameters::Transformer
- Defined in:
- lib/brujula/parameters/transformer.rb
Instance Attribute Summary collapse
-
#parameters ⇒ Object
readonly
Returns the value of attribute parameters.
Instance Method Summary collapse
- #call(string) ⇒ Object
-
#initialize(parameters:) ⇒ Transformer
constructor
A new instance of Transformer.
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
#parameters ⇒ Object (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 |