Class: Kondate::PropertyFile
- Inherits:
-
Object
- Object
- Kondate::PropertyFile
- Defined in:
- lib/kondate/property_file.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#source_files ⇒ Object
readonly
Returns the value of attribute source_files.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(path, source_files) ⇒ PropertyFile
constructor
A new instance of PropertyFile.
- #load ⇒ Object
- #read ⇒ Object
Constructor Details
#initialize(path, source_files) ⇒ PropertyFile
Returns a new instance of PropertyFile.
7 8 9 10 |
# File 'lib/kondate/property_file.rb', line 7 def initialize(path, source_files) @path = path @source_files = source_files end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/kondate/property_file.rb', line 5 def path @path end |
#source_files ⇒ Object (readonly)
Returns the value of attribute source_files.
5 6 7 |
# File 'lib/kondate/property_file.rb', line 5 def source_files @source_files end |
Instance Method Details
#empty? ⇒ Boolean
20 21 22 |
# File 'lib/kondate/property_file.rb', line 20 def empty? @path.nil? end |
#load ⇒ Object
16 17 18 |
# File 'lib/kondate/property_file.rb', line 16 def load YAML.load_file(path) end |
#read ⇒ Object
12 13 14 |
# File 'lib/kondate/property_file.rb', line 12 def read mask_secrets(File.read(path)) end |