Class: TRMNL::API::Models::Display
- Inherits:
-
Data
- Object
- Data
- TRMNL::API::Models::Display
- Defined in:
- lib/trmnl/api/models/display.rb
Overview
Models the data of the API response.
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#firmware_url ⇒ Object
readonly
Returns the value of attribute firmware_url.
-
#firmware_version ⇒ Object
readonly
Returns the value of attribute firmware_version.
-
#image_url ⇒ Object
readonly
Returns the value of attribute image_url.
-
#image_url_timeout ⇒ Object
readonly
Returns the value of attribute image_url_timeout.
-
#maximum_compatibility ⇒ Object
readonly
Returns the value of attribute maximum_compatibility.
-
#refresh_rate ⇒ Object
readonly
Returns the value of attribute refresh_rate.
-
#reset_firmware ⇒ Object
readonly
Returns the value of attribute reset_firmware.
-
#special_function ⇒ Object
readonly
Returns the value of attribute special_function.
-
#temperature_profile ⇒ Object
readonly
Returns the value of attribute temperature_profile.
-
#touchbar_mode ⇒ Object
readonly
Returns the value of attribute touchbar_mode.
-
#update_firmware ⇒ Object
readonly
Returns the value of attribute update_firmware.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filename: nil, firmware_url: nil, firmware_version: nil, image_url: nil, image_url_timeout: 0, maximum_compatibility: false, refresh_rate: 300, reset_firmware: false, special_function: "sleep", temperature_profile: "default", touchbar_mode: "tap", update_firmware: false) ⇒ Display
constructor
A new instance of Display.
- #to_json ⇒ Object
Constructor Details
#initialize(filename: nil, firmware_url: nil, firmware_version: nil, image_url: nil, image_url_timeout: 0, maximum_compatibility: false, refresh_rate: 300, reset_firmware: false, special_function: "sleep", temperature_profile: "default", touchbar_mode: "tap", update_firmware: false) ⇒ Display
Returns a new instance of Display.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/trmnl/api/models/display.rb', line 23 def initialize filename: nil, firmware_url: nil, firmware_version: nil, image_url: nil, image_url_timeout: 0, maximum_compatibility: false, refresh_rate: 300, reset_firmware: false, special_function: "sleep", temperature_profile: "default", touchbar_mode: "tap", update_firmware: false super end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def filename @filename end |
#firmware_url ⇒ Object (readonly)
Returns the value of attribute firmware_url
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def firmware_url @firmware_url end |
#firmware_version ⇒ Object (readonly)
Returns the value of attribute firmware_version
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def firmware_version @firmware_version end |
#image_url ⇒ Object (readonly)
Returns the value of attribute image_url
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def image_url @image_url end |
#image_url_timeout ⇒ Object (readonly)
Returns the value of attribute image_url_timeout
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def image_url_timeout @image_url_timeout end |
#maximum_compatibility ⇒ Object (readonly)
Returns the value of attribute maximum_compatibility
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def maximum_compatibility @maximum_compatibility end |
#refresh_rate ⇒ Object (readonly)
Returns the value of attribute refresh_rate
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def refresh_rate @refresh_rate end |
#reset_firmware ⇒ Object (readonly)
Returns the value of attribute reset_firmware
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def reset_firmware @reset_firmware end |
#special_function ⇒ Object (readonly)
Returns the value of attribute special_function
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def special_function @special_function end |
#temperature_profile ⇒ Object (readonly)
Returns the value of attribute temperature_profile
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def temperature_profile @temperature_profile end |
#touchbar_mode ⇒ Object (readonly)
Returns the value of attribute touchbar_mode
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def @touchbar_mode end |
#update_firmware ⇒ Object (readonly)
Returns the value of attribute update_firmware
7 8 9 |
# File 'lib/trmnl/api/models/display.rb', line 7 def update_firmware @update_firmware end |
Class Method Details
.for(attributes) ⇒ Object
21 |
# File 'lib/trmnl/api/models/display.rb', line 21 def self.for(attributes) = new(**attributes) |
Instance Method Details
#to_json ⇒ Object
38 |
# File 'lib/trmnl/api/models/display.rb', line 38 def to_json(*) = to_h.to_json(*) |