Class: Harnex::Config::RepoConfig

Inherits:
Struct
  • Object
show all
Defined in:
lib/harnex/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



25
26
27
# File 'lib/harnex/config.rb', line 25

def data
  @data
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



25
26
27
# File 'lib/harnex/config.rb', line 25

def path
  @path
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



25
26
27
# File 'lib/harnex/config.rb', line 25

def root
  @root
end

Instance Method Details

#phaseObject



30
31
32
# File 'lib/harnex/config.rb', line 30

def phase
  data.is_a?(Hash) ? data["phase"] : nil
end

#present?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/harnex/config.rb', line 26

def present?
  !path.nil? && File.file?(path)
end

#retentionObject



34
35
36
# File 'lib/harnex/config.rb', line 34

def retention
  data.is_a?(Hash) ? data["retention"] : nil
end