Class: Parsable::Remote
- Inherits:
-
Object
- Object
- Parsable::Remote
- Defined in:
- lib/parsable/remote.rb
Instance Attribute Summary collapse
-
#secure ⇒ Object
uses the response from a remote location.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Remote
constructor
A new instance of Remote.
- #method_missing(method_sym, *arguments, &block) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Remote
Returns a new instance of Remote.
10 11 12 |
# File 'lib/parsable/remote.rb', line 10 def initialize ={} self.secure = .fetch(:secure, false) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_sym, *arguments, &block) ⇒ Object
14 15 16 17 18 |
# File 'lib/parsable/remote.rb', line 14 def method_missing(method_sym, *arguments, &block) if uri = uri?(method_sym) get_response(uri) end end |
Instance Attribute Details
#secure ⇒ Object
uses the response from a remote location
8 9 10 |
# File 'lib/parsable/remote.rb', line 8 def secure @secure end |