Class: BungieClient::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/bungie_client/service.rb

Overview

Simple class for service structure

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options)
  @method_type = ((%w(get post).include? options[:method]) ? options[:method] : 'get')
  @name        = options[:name].to_s
  @endpoint    = options[:endpoint].to_s
end

Instance Attribute Details

#endpointObject (readonly)

Returns the value of attribute endpoint.



3
4
5
# File 'lib/bungie_client/service.rb', line 3

def endpoint
  @endpoint
end

#method_typeObject (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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/bungie_client/service.rb', line 3

def name
  @name
end