Class: ActiveResourceHttpMock::Configuration
- Inherits:
-
Object
- Object
- ActiveResourceHttpMock::Configuration
- Defined in:
- lib/active_resource_http_mock/configuration.rb
Instance Attribute Summary collapse
-
#httpmock_path ⇒ Object
Returns the value of attribute httpmock_path.
-
#url_decoder ⇒ Object
Returns the value of attribute url_decoder.
-
#url_encoder ⇒ Object
Returns the value of attribute url_encoder.
Instance Method Summary collapse
- #decode_url(&block) ⇒ Object
- #encode_url(&block) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_path ⇒ Object
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_decoder ⇒ Object
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_encoder ⇒ Object
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 |