Class: Crowbar::Client::Request::Party

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/crowbar/client/request/party.rb

Instance Method Summary collapse

Constructor Details

#initializeParty

Returns a new instance of Party.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/crowbar/client/request/party.rb', line 28

def initialize
  self.class.base_uri(
    config.server
  )

  self.class.default_timeout(
    config.timeout
  )

  self.class.digest_auth(
    config.username,
    config.password
  ) if should_auth

  self.class.debug_output(
    $stderr
  ) if should_debug
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arguments, &block) ⇒ Object



51
52
53
54
55
56
57
# File 'lib/crowbar/client/request/party.rb', line 51

def method_missing(method, *arguments, &block)
  if self.class.respond_to?(method, true)
    self.class.send(method, *arguments, &block)
  else
    super
  end
end

Instance Method Details

#configObject



47
48
49
# File 'lib/crowbar/client/request/party.rb', line 47

def config
  @config ||= Config
end

#respond_to?(method_sym, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


59
60
61
62
63
64
65
# File 'lib/crowbar/client/request/party.rb', line 59

def respond_to?(method_sym, include_private = false)
  if self.class.respond_to?(method, true)
    true
  else
    super
  end
end