Class: Kondate::PropertyFile

Inherits:
Object
  • Object
show all
Defined in:
lib/kondate/property_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject (readonly)

Returns the value of attribute path.



5
6
7
# File 'lib/kondate/property_file.rb', line 5

def path
  @path
end

#source_filesObject (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

Returns:

  • (Boolean)


20
21
22
# File 'lib/kondate/property_file.rb', line 20

def empty?
  @path.nil?
end

#loadObject



16
17
18
# File 'lib/kondate/property_file.rb', line 16

def load
  YAML.load_file(path)
end

#readObject



12
13
14
# File 'lib/kondate/property_file.rb', line 12

def read
  mask_secrets(File.read(path))
end