Class: Basecamp::Types::DockItem
- Inherits:
-
Object
- Object
- Basecamp::Types::DockItem
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
DockItem
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ DockItem
constructor
A new instance of DockItem.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ DockItem
Returns a new instance of DockItem.
1354 1355 1356 1357 1358 1359 1360 1361 1362 |
# File 'lib/basecamp/generated/types.rb', line 1354 def initialize(data = {}) @app_url = data["app_url"] @enabled = parse_boolean(data["enabled"]) @id = parse_integer(data["id"]) @name = data["name"] @title = data["title"] @url = data["url"] @position = parse_integer(data["position"]) end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def app_url @app_url end |
#enabled ⇒ Object
Returns the value of attribute enabled.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def position @position end |
#title ⇒ Object
Returns the value of attribute title.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
1347 1348 1349 |
# File 'lib/basecamp/generated/types.rb', line 1347 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1350 1351 1352 |
# File 'lib/basecamp/generated/types.rb', line 1350 def self.required_fields %i[app_url enabled id name title url].freeze end |
Instance Method Details
#to_h ⇒ Object
1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 |
# File 'lib/basecamp/generated/types.rb', line 1364 def to_h { "app_url" => @app_url, "enabled" => @enabled, "id" => @id, "name" => @name, "title" => @title, "url" => @url, "position" => @position, }.compact end |
#to_json(*args) ⇒ Object
1376 1377 1378 |
# File 'lib/basecamp/generated/types.rb', line 1376 def to_json(*args) to_h.to_json(*args) end |