Class: Lamma::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/lamma/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(yaml) ⇒ Environment

Returns a new instance of Environment.



5
6
7
# File 'lib/lamma/environment.rb', line 5

def initialize(yaml)
  @variables = yaml.fetch('variables', {})
end

Instance Attribute Details

#variablesObject

Returns the value of attribute variables.



3
4
5
# File 'lib/lamma/environment.rb', line 3

def variables
  @variables
end

Instance Method Details

#to_hObject



9
10
11
12
13
# File 'lib/lamma/environment.rb', line 9

def to_h
  {
    variables: @variables
  }
end