Class: Webspicy::Client

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

Direct Known Subclasses

HttpClient, RackTestClient

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope) ⇒ Client

Returns a new instance of Client.



4
5
6
# File 'lib/webspicy/client.rb', line 4

def initialize(scope)
  @scope = scope
end

Instance Attribute Details

#scopeObject (readonly)

Returns the value of attribute scope.



7
8
9
# File 'lib/webspicy/client.rb', line 7

def scope
  @scope
end

Instance Method Details

#before(*args, &bl) ⇒ Object



13
14
15
16
17
18
# File 'lib/webspicy/client.rb', line 13

def before(*args, &bl)
  config.before_listeners.each do |beach|
    args << self
    beach.call(*args, &bl)
  end
end

#configObject



9
10
11
# File 'lib/webspicy/client.rb', line 9

def config
  scope.config
end