Class: Flaker::Base
Direct Known Subclasses
Instance Method Summary collapse
- #fetch(param, options = {}) ⇒ Object
-
#initialize(user = nil, password = nil) ⇒ Base
constructor
Initializes the object.
Constructor Details
#initialize(user = nil, password = nil) ⇒ Base
Initializes the object. Takes username and password as arguments
7 8 9 10 11 12 13 |
# File 'lib/flaker/base.rb', line 7 def initialize(user = nil, password = nil) if user && password self.class.basic_auth user, password else return false end end |
Instance Method Details
#fetch(param, options = {}) ⇒ Object
15 16 17 |
# File 'lib/flaker/base.rb', line 15 def fetch(param, = {}) Flaker::ObjectWrapper.new(self.class.get(Flaker::API_PATH + param)) end |