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.
1178 1179 1180 1181 1182 1183 1184 1185 1186 |
# File 'lib/basecamp/generated/types.rb', line 1178 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.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def app_url @app_url end |
#enabled ⇒ Object
Returns the value of attribute enabled.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def enabled @enabled end |
#id ⇒ Object
Returns the value of attribute id.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def position @position end |
#title ⇒ Object
Returns the value of attribute title.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
1171 1172 1173 |
# File 'lib/basecamp/generated/types.rb', line 1171 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
1174 1175 1176 |
# File 'lib/basecamp/generated/types.rb', line 1174 def self.required_fields %i[app_url enabled id name title url].freeze end |
Instance Method Details
#to_h ⇒ Object
1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'lib/basecamp/generated/types.rb', line 1188 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
1200 1201 1202 |
# File 'lib/basecamp/generated/types.rb', line 1200 def to_json(*args) to_h.to_json(*args) end |