Class: ActiveResourceHttpMock::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/active_resource_http_mock/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
8
9
# File 'lib/active_resource_http_mock/configuration.rb', line 5

def initialize
  self.httpmock_path = 'spec/fixtures/httpmock'
  self.url_encoder   = ->(url) { url }
  self.url_decoder   = ->(url) { url }
end

Instance Attribute Details

#httpmock_pathObject

Returns the value of attribute httpmock_path.



3
4
5
# File 'lib/active_resource_http_mock/configuration.rb', line 3

def httpmock_path
  @httpmock_path
end

#url_decoderObject

Returns the value of attribute url_decoder.



3
4
5
# File 'lib/active_resource_http_mock/configuration.rb', line 3

def url_decoder
  @url_decoder
end

#url_encoderObject

Returns the value of attribute url_encoder.



3
4
5
# File 'lib/active_resource_http_mock/configuration.rb', line 3

def url_encoder
  @url_encoder
end

Instance Method Details

#decode_url(&block) ⇒ Object



15
16
17
# File 'lib/active_resource_http_mock/configuration.rb', line 15

def decode_url(&block)
  @url_decoder = block if block_given?
end

#encode_url(&block) ⇒ Object



11
12
13
# File 'lib/active_resource_http_mock/configuration.rb', line 11

def encode_url(&block)
  @url_encoder = block if block_given?
end