Class: Basecamp::Types::PreviewableAttachment
- Inherits:
-
Object
- Object
- Basecamp::Types::PreviewableAttachment
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
PreviewableAttachment
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#filesize ⇒ Object
Returns the value of attribute filesize.
-
#height ⇒ Object
Returns the value of attribute height.
-
#id ⇒ Object
Returns the value of attribute id.
-
#url ⇒ Object
Returns the value of attribute url.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ PreviewableAttachment
constructor
A new instance of PreviewableAttachment.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ PreviewableAttachment
Returns a new instance of PreviewableAttachment.
2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 |
# File 'lib/basecamp/generated/types.rb', line 2597 def initialize(data = {}) @app_url = data["app_url"] @content_type = data["content_type"] @filename = data["filename"] @filesize = parse_integer(data["filesize"]) @height = parse_integer(data["height"]) @id = parse_integer(data["id"]) @url = data["url"] @width = parse_integer(data["width"]) end |
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def app_url @app_url end |
#content_type ⇒ Object
Returns the value of attribute content_type.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def content_type @content_type end |
#filename ⇒ Object
Returns the value of attribute filename.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def filename @filename end |
#filesize ⇒ Object
Returns the value of attribute filesize.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def filesize @filesize end |
#height ⇒ Object
Returns the value of attribute height.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def height @height end |
#id ⇒ Object
Returns the value of attribute id.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def id @id end |
#url ⇒ Object
Returns the value of attribute url.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def url @url end |
#width ⇒ Object
Returns the value of attribute width.
2595 2596 2597 |
# File 'lib/basecamp/generated/types.rb', line 2595 def width @width end |
Instance Method Details
#to_h ⇒ Object
2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 |
# File 'lib/basecamp/generated/types.rb', line 2608 def to_h { "app_url" => @app_url, "content_type" => @content_type, "filename" => @filename, "filesize" => @filesize, "height" => @height, "id" => @id, "url" => @url, "width" => @width, }.compact end |
#to_json(*args) ⇒ Object
2621 2622 2623 |
# File 'lib/basecamp/generated/types.rb', line 2621 def to_json(*args) to_h.to_json(*args) end |