Class: Basecamp::Types::GaugeNeedlePayload
- Inherits:
-
Object
- Object
- Basecamp::Types::GaugeNeedlePayload
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
GaugeNeedlePayload
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#description ⇒ Object
Returns the value of attribute description.
-
#position ⇒ Object
Returns the value of attribute position.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ GaugeNeedlePayload
constructor
A new instance of GaugeNeedlePayload.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ GaugeNeedlePayload
Returns a new instance of GaugeNeedlePayload.
1796 1797 1798 1799 1800 |
# File 'lib/basecamp/generated/types.rb', line 1796 def initialize(data = {}) @position = parse_integer(data["position"]) @color = data["color"] @description = data["description"] end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
1789 1790 1791 |
# File 'lib/basecamp/generated/types.rb', line 1789 def color @color end |
#description ⇒ Object
Returns the value of attribute description.
1789 1790 1791 |
# File 'lib/basecamp/generated/types.rb', line 1789 def description @description end |
#position ⇒ Object
Returns the value of attribute position.
1789 1790 1791 |
# File 'lib/basecamp/generated/types.rb', line 1789 def position @position end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1792 1793 1794 |
# File 'lib/basecamp/generated/types.rb', line 1792 def self.required_fields %i[position].freeze end |
Instance Method Details
#to_h ⇒ Object
1802 1803 1804 1805 1806 1807 1808 |
# File 'lib/basecamp/generated/types.rb', line 1802 def to_h { "position" => @position, "color" => @color, "description" => @description, }.compact end |
#to_json(*args) ⇒ Object
1810 1811 1812 |
# File 'lib/basecamp/generated/types.rb', line 1810 def to_json(*args) to_h.to_json(*args) end |