Class: Status
Instance Attribute Summary collapse
-
#category_id ⇒ Object
readonly
Returns the value of attribute category_id.
-
#category_name ⇒ Object
readonly
Returns the value of attribute category_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(name:, id:, category_name:, category_id:) ⇒ Status
constructor
A new instance of Status.
- #state ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name:, id:, category_name:, category_id:) ⇒ Status
Returns a new instance of Status.
7 8 9 10 11 12 |
# File 'lib/jirametrics/status.rb', line 7 def initialize name:, id:, category_name:, category_id: @name = name @id = id @category_name = category_name @category_id = category_id end |
Instance Attribute Details
#category_id ⇒ Object (readonly)
Returns the value of attribute category_id.
4 5 6 |
# File 'lib/jirametrics/status.rb', line 4 def category_id @category_id end |
#category_name ⇒ Object (readonly)
Returns the value of attribute category_name.
4 5 6 |
# File 'lib/jirametrics/status.rb', line 4 def category_name @category_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/jirametrics/status.rb', line 4 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/jirametrics/status.rb', line 5 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/jirametrics/status.rb', line 4 def type @type end |
Instance Method Details
#eql?(other) ⇒ Boolean
19 20 21 |
# File 'lib/jirametrics/status.rb', line 19 def eql?(other) (other.class == self.class) && (other.state == state) end |
#state ⇒ Object
23 24 25 |
# File 'lib/jirametrics/status.rb', line 23 def state instance_variables.map { |variable| instance_variable_get variable } end |
#to_s ⇒ Object
14 15 16 17 |
# File 'lib/jirametrics/status.rb', line 14 def to_s "Status(name=#{@name.inspect}, id=#{@id.inspect}," \ " category_name=#{@category_name.inspect}, category_id=#{@category_id.inspect})" end |