Class: Unified2::ConfigFile
- Inherits:
-
Object
- Object
- Unified2::ConfigFile
- Defined in:
- lib/unified2/config_file.rb
Overview
Configuration file
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#md5 ⇒ Object
Returns the value of attribute md5.
-
#path ⇒ Object
Returns the value of attribute path.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, path) ⇒ ConfigFile
constructor
Initialize configuration file.
-
#size ⇒ Integer
Size.
Constructor Details
#initialize(type, path) ⇒ ConfigFile
Initialize configuration file
15 16 17 18 19 20 21 |
# File 'lib/unified2/config_file.rb', line 15 def initialize(type, path) @type = type @path = path @data = {} @md5 = Digest::MD5.hexdigest(@path) import end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
7 8 9 |
# File 'lib/unified2/config_file.rb', line 7 def data @data end |
#md5 ⇒ Object
Returns the value of attribute md5.
7 8 9 |
# File 'lib/unified2/config_file.rb', line 7 def md5 @md5 end |
#path ⇒ Object
Returns the value of attribute path.
7 8 9 |
# File 'lib/unified2/config_file.rb', line 7 def path @path end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/unified2/config_file.rb', line 7 def type @type end |
Instance Method Details
#size ⇒ Integer
Size
28 29 30 |
# File 'lib/unified2/config_file.rb', line 28 def size @data.size end |