Class: Puppi::Files::Datafile

Inherits:
Object
  • Object
show all
Defined in:
lib/puppi/files/datafile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Datafile

Returns a new instance of Datafile.



6
7
8
9
10
11
12
13
# File 'lib/puppi/files/datafile.rb', line 6

def initialize args = {}
  @variables = args
  @var = Hash.new
  @variables.each_key do |key|
    @var[key.to_sym] = @variables[key]
  end
  @variables = @var
end

Instance Attribute Details

#variablesObject (readonly)

Returns the value of attribute variables.



4
5
6
# File 'lib/puppi/files/datafile.rb', line 4

def variables
  @variables
end