Module: Wayback::Configurable
Instance Attribute Summary collapse
-
#connection_options ⇒ Object
Returns the value of attribute connection_options.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#endpoint_path ⇒ Object
Returns the value of attribute endpoint_path.
-
#identity_map ⇒ Object
Returns the value of attribute identity_map.
-
#json_endpoint ⇒ Object
Returns the value of attribute json_endpoint.
-
#json_endpoint_path ⇒ Object
Returns the value of attribute json_endpoint_path.
-
#middleware ⇒ Object
Returns the value of attribute middleware.
Class Method Summary collapse
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block.
- #reset! ⇒ Object (also: #setup)
Instance Attribute Details
#connection_options ⇒ Object
Returns the value of attribute connection_options.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def @connection_options end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def endpoint @endpoint end |
#endpoint_path ⇒ Object
Returns the value of attribute endpoint_path.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def endpoint_path @endpoint_path end |
#identity_map ⇒ Object
Returns the value of attribute identity_map.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def identity_map @identity_map end |
#json_endpoint ⇒ Object
Returns the value of attribute json_endpoint.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def json_endpoint @json_endpoint end |
#json_endpoint_path ⇒ Object
Returns the value of attribute json_endpoint_path.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def json_endpoint_path @json_endpoint_path end |
#middleware ⇒ Object
Returns the value of attribute middleware.
7 8 9 |
# File 'lib/wayback/configurable.rb', line 7 def middleware @middleware end |
Class Method Details
.keys ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/wayback/configurable.rb', line 12 def keys @keys ||= [ :endpoint, :endpoint_path, :json_endpoint, :json_endpoint_path, :connection_options, :identity_map, :middleware ] end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Convenience method to allow configuration options to be set in a block
30 31 32 33 |
# File 'lib/wayback/configurable.rb', line 30 def configure yield self self end |
#reset! ⇒ Object Also known as: setup
35 36 37 38 39 40 |
# File 'lib/wayback/configurable.rb', line 35 def reset! Wayback::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", Wayback::Default.[key]) end self end |