Class: Unified2::ConfigFile

Inherits:
Object
  • Object
show all
Defined in:
lib/unified2/config_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, path) ⇒ ConfigFile

Returns a new instance of ConfigFile.



6
7
8
9
10
11
12
# File 'lib/unified2/config_file.rb', line 6

def initialize(type, path)
  @type = type
  @path = path
  @data = {}
  @md5 = Digest::MD5.hexdigest(@path)
  import
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



4
5
6
# File 'lib/unified2/config_file.rb', line 4

def data
  @data
end

#md5Object

Returns the value of attribute md5.



4
5
6
# File 'lib/unified2/config_file.rb', line 4

def md5
  @md5
end

#pathObject

Returns the value of attribute path.



4
5
6
# File 'lib/unified2/config_file.rb', line 4

def path
  @path
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/unified2/config_file.rb', line 4

def type
  @type
end