Class: PusherPlatform::SDKInfo
- Inherits:
-
Object
- Object
- PusherPlatform::SDKInfo
- Defined in:
- lib/pusher-platform/sdk_info.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#product_name ⇒ Object
readonly
Returns the value of attribute product_name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(options) ⇒ SDKInfo
constructor
A new instance of SDKInfo.
Constructor Details
#initialize(options) ⇒ SDKInfo
Returns a new instance of SDKInfo.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pusher-platform/sdk_info.rb', line 7 def initialize() raise Error.new('No product_name provided to SDKInfo') if [:product_name].nil? raise Error.new('No version provided to SDKInfo') if [:version].nil? @product_name = [:product_name] @version = [:version] @platform = [:platform] || 'server' @language = 'ruby' @headers = { "X-SDK-Product" => @product_name, "X-SDK-Version" => @version, "X-SDK-Language" => @language, "X-SDK-Platform" => @platform } end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/pusher-platform/sdk_info.rb', line 5 def headers @headers end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
5 6 7 |
# File 'lib/pusher-platform/sdk_info.rb', line 5 def language @language end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
5 6 7 |
# File 'lib/pusher-platform/sdk_info.rb', line 5 def platform @platform end |
#product_name ⇒ Object (readonly)
Returns the value of attribute product_name.
5 6 7 |
# File 'lib/pusher-platform/sdk_info.rb', line 5 def product_name @product_name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
5 6 7 |
# File 'lib/pusher-platform/sdk_info.rb', line 5 def version @version end |