Class: Basketcase::ElementStatus

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

Overview

Represents the status of an element

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, status, base_version = nil) ⇒ ElementStatus

Returns a new instance of ElementStatus.



103
104
105
106
107
# File 'lib/basketcase.rb', line 103

def initialize(path, status, base_version = nil)
  @path = path
  @status = status
  @base_version = base_version
end

Instance Attribute Details

#base_versionObject (readonly)

Returns the value of attribute base_version.



109
110
111
# File 'lib/basketcase.rb', line 109

def base_version
  @base_version
end

#pathObject (readonly)

Returns the value of attribute path.



109
110
111
# File 'lib/basketcase.rb', line 109

def path
  @path
end

#statusObject (readonly)

Returns the value of attribute status.



109
110
111
# File 'lib/basketcase.rb', line 109

def status
  @status
end

Instance Method Details

#to_sObject



111
112
113
114
115
# File 'lib/basketcase.rb', line 111

def to_s
  s = "#{path} (#{status})"
  s += " [#{base_version}]" if base_version
  return s
end