Class: BungieClient::Service
- Inherits:
-
Object
- Object
- BungieClient::Service
- Defined in:
- lib/bungie_client/service.rb
Overview
Simple class for service structure
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(options) ⇒ Service
Returns a new instance of Service.
5 6 7 8 9 |
# File 'lib/bungie_client/service.rb', line 5 def initialize() @method_type = ((%w(get post).include? [:method]) ? [:method] : 'get') @name = [:name].to_s @endpoint = [:endpoint].to_s end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
3 4 5 |
# File 'lib/bungie_client/service.rb', line 3 def endpoint @endpoint end |
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
3 4 5 |
# File 'lib/bungie_client/service.rb', line 3 def method_type @method_type end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bungie_client/service.rb', line 3 def name @name end |