Class: Status::Category
- Inherits:
-
Object
- Object
- Status::Category
- Defined in:
- lib/jirametrics/status.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #==(other) ⇒ Object
- #done? ⇒ Boolean
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
- #indeterminate? ⇒ Boolean
-
#initialize(id:, name:, key:) ⇒ Category
constructor
A new instance of Category.
- #new? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(id:, name:, key:) ⇒ Category
Returns a new instance of Category.
12 13 14 15 16 |
# File 'lib/jirametrics/status.rb', line 12 def initialize id:, name:, key: @id = id @name = name @key = key end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/jirametrics/status.rb', line 10 def id @id end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
10 11 12 |
# File 'lib/jirametrics/status.rb', line 10 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/jirametrics/status.rb', line 10 def name @name end |
Instance Method Details
#<=>(other) ⇒ Object
22 23 24 |
# File 'lib/jirametrics/status.rb', line 22 def <=> other id <=> other.id end |
#==(other) ⇒ Object
26 27 28 |
# File 'lib/jirametrics/status.rb', line 26 def == other id == other.id end |
#done? ⇒ Boolean
35 |
# File 'lib/jirametrics/status.rb', line 35 def done? = (@key == 'done') |
#eql?(other) ⇒ Boolean
30 |
# File 'lib/jirametrics/status.rb', line 30 def eql?(other) = id.eql?(other.id) |
#hash ⇒ Object
31 |
# File 'lib/jirametrics/status.rb', line 31 def hash = id.hash |
#indeterminate? ⇒ Boolean
34 |
# File 'lib/jirametrics/status.rb', line 34 def indeterminate? = (@key == 'indeterminate') |
#new? ⇒ Boolean
33 |
# File 'lib/jirametrics/status.rb', line 33 def new? = (@key == 'new') |
#to_s ⇒ Object
18 19 20 |
# File 'lib/jirametrics/status.rb', line 18 def to_s "#{name.inspect}:#{id.inspect}" end |