Class: Basecamp::Types::CalendarAttributes
- Inherits:
-
Object
- Object
- Basecamp::Types::CalendarAttributes
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
CalendarAttributes
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ CalendarAttributes
constructor
A new instance of CalendarAttributes.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ CalendarAttributes
Returns a new instance of CalendarAttributes.
452 453 454 |
# File 'lib/basecamp/generated/types.rb', line 452 def initialize(data = {}) @color = data["color"] end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
445 446 447 |
# File 'lib/basecamp/generated/types.rb', line 445 def color @color end |
Class Method Details
.required_fields ⇒ Array<Symbol>
448 449 450 |
# File 'lib/basecamp/generated/types.rb', line 448 def self.required_fields %i[color].freeze end |
Instance Method Details
#to_h ⇒ Object
456 457 458 459 460 |
# File 'lib/basecamp/generated/types.rb', line 456 def to_h { "color" => @color, }.compact end |
#to_json(*args) ⇒ Object
462 463 464 |
# File 'lib/basecamp/generated/types.rb', line 462 def to_json(*args) to_h.to_json(*args) end |