Class: Basecamp::Types::HillChartDot
- Inherits:
-
Object
- Object
- Basecamp::Types::HillChartDot
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
HillChartDot
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#color ⇒ Object
Returns the value of attribute color.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#position ⇒ Object
Returns the value of attribute position.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ HillChartDot
constructor
A new instance of HillChartDot.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ HillChartDot
Returns a new instance of HillChartDot.
1708 1709 1710 1711 1712 1713 1714 1715 |
# File 'lib/basecamp/generated/types.rb', line 1708 def initialize(data = {}) @color = data["color"] @id = parse_integer(data["id"]) @label = data["label"] @position = parse_integer(data["position"]) @app_url = data["app_url"] @url = data["url"] end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
1701 1702 1703 |
# File 'lib/basecamp/generated/types.rb', line 1701 def app_url @app_url end |
#color ⇒ Object
Returns the value of attribute color.
1701 1702 1703 |
# File 'lib/basecamp/generated/types.rb', line 1701 def color @color end |
#id ⇒ Object
Returns the value of attribute id.
1701 1702 1703 |
# File 'lib/basecamp/generated/types.rb', line 1701 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
1701 1702 1703 |
# File 'lib/basecamp/generated/types.rb', line 1701 def label @label end |
#position ⇒ Object
Returns the value of attribute position.
1701 1702 1703 |
# File 'lib/basecamp/generated/types.rb', line 1701 def position @position end |
#url ⇒ Object
Returns the value of attribute url.
1701 1702 1703 |
# File 'lib/basecamp/generated/types.rb', line 1701 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1704 1705 1706 |
# File 'lib/basecamp/generated/types.rb', line 1704 def self.required_fields %i[color id label position].freeze end |
Instance Method Details
#to_h ⇒ Object
1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 |
# File 'lib/basecamp/generated/types.rb', line 1717 def to_h { "color" => @color, "id" => @id, "label" => @label, "position" => @position, "app_url" => @app_url, "url" => @url, }.compact end |
#to_json(*args) ⇒ Object
1728 1729 1730 |
# File 'lib/basecamp/generated/types.rb', line 1728 def to_json(*args) to_h.to_json(*args) end |