Class: Proctor::Config::AppFile

Inherits:
Object
  • Object
show all
Includes:
Proctor::Config, Util::Helpers
Defined in:
lib/proctor/config/app_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util::Helpers

#md5_handle

Constructor Details

#initialize(file_path) ⇒ AppFile

Returns a new instance of AppFile.



13
14
15
16
17
18
19
# File 'lib/proctor/config/app_file.rb', line 13

def initialize(file_path)
  validate_file_existence(file_path)
  @name    = file_path
  @data    = load_data(file_path)
  @handle  = md5_handle(file_path)
  validate_data_format(file_path)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



11
12
13
# File 'lib/proctor/config/app_file.rb', line 11

def data
  @data
end

#handleObject (readonly)

Returns the value of attribute handle.



11
12
13
# File 'lib/proctor/config/app_file.rb', line 11

def handle
  @handle
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/proctor/config/app_file.rb', line 11

def name
  @name
end