Class: TRMNL::API::Configuration::Content
- Inherits:
-
Struct
- Object
- Struct
- TRMNL::API::Configuration::Content
- Defined in:
- lib/trmnl/api/configuration/content.rb
Overview
Provides API client configuration content.
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#timeout_connect ⇒ Object
Returns the value of attribute timeout_connect.
-
#timeout_read ⇒ Object
Returns the value of attribute timeout_read.
-
#timeout_write ⇒ Object
Returns the value of attribute timeout_write.
-
#uri ⇒ Object
Returns the value of attribute uri.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type
9 10 11 |
# File 'lib/trmnl/api/configuration/content.rb', line 9 def content_type @content_type end |
#timeout_connect ⇒ Object
Returns the value of attribute timeout_connect
9 10 11 |
# File 'lib/trmnl/api/configuration/content.rb', line 9 def timeout_connect @timeout_connect end |
#timeout_read ⇒ Object
Returns the value of attribute timeout_read
9 10 11 |
# File 'lib/trmnl/api/configuration/content.rb', line 9 def timeout_read @timeout_read end |
#timeout_write ⇒ Object
Returns the value of attribute timeout_write
9 10 11 |
# File 'lib/trmnl/api/configuration/content.rb', line 9 def timeout_write @timeout_write end |
#uri ⇒ Object
Returns the value of attribute uri
9 10 11 |
# File 'lib/trmnl/api/configuration/content.rb', line 9 def uri @uri end |
#user_agent ⇒ Object
Returns the value of attribute user_agent
9 10 11 |
# File 'lib/trmnl/api/configuration/content.rb', line 9 def user_agent @user_agent end |
Instance Method Details
#headers ⇒ Object
17 18 19 20 |
# File 'lib/trmnl/api/configuration/content.rb', line 17 def headers agent = " (#{user_agent})" if user_agent {content_type: content_type, user_agent: "http.rb/#{HTTP::VERSION}#{agent}"}.compact end |
#timeout ⇒ Object
22 |
# File 'lib/trmnl/api/configuration/content.rb', line 22 def timeout = {connect: timeout_connect, read: timeout_read, write: timeout_write} |