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
18 19 20 21 22 23 24 |
# File 'lib/unified2/config_file.rb', line 18 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.
10 11 12 |
# File 'lib/unified2/config_file.rb', line 10 def data @data end |
#md5 ⇒ Object
Returns the value of attribute md5.
10 11 12 |
# File 'lib/unified2/config_file.rb', line 10 def md5 @md5 end |
#path ⇒ Object
Returns the value of attribute path.
10 11 12 |
# File 'lib/unified2/config_file.rb', line 10 def path @path end |
#type ⇒ Object
Returns the value of attribute type.
10 11 12 |
# File 'lib/unified2/config_file.rb', line 10 def type @type end |
Instance Method Details
#size ⇒ Integer
Size
31 32 33 |
# File 'lib/unified2/config_file.rb', line 31 def size @data.size end |