Class: Neows::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/neows/client.rb

Direct Known Subclasses

REST::Client

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ Neows::Client

Initializes a new Client object

Parameters:

  • options (Hash) (defaults to: {})

Yields:

  • (_self)

Yield Parameters:

  • _self (Neows::Client)

    the object that the method was called on



11
12
13
14
15
16
# File 'lib/neows/client.rb', line 11

def initialize(options = {})
  options.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
  yield(self) if block_given?
end

Instance Attribute Details

#base_urlObject

Returns the value of attribute base_url.



5
6
7
# File 'lib/neows/client.rb', line 5

def base_url
  @base_url
end

Instance Method Details

#user_agentString

Returns:

  • (String)


23
24
25
# File 'lib/neows/client.rb', line 23

def user_agent
  "NeowsRubyGem/#{Neows::VERSION}"
end