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.



149
150
151
152
153
# File 'lib/basketcase.rb', line 149

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.



155
156
157
# File 'lib/basketcase.rb', line 155

def base_version
  @base_version
end

#pathObject (readonly)

Returns the value of attribute path.



155
156
157
# File 'lib/basketcase.rb', line 155

def path
  @path
end

#statusObject (readonly)

Returns the value of attribute status.



155
156
157
# File 'lib/basketcase.rb', line 155

def status
  @status
end

Instance Method Details

#to_sObject



157
158
159
160
161
# File 'lib/basketcase.rb', line 157

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