Class: Stackd::Client
- Inherits:
-
Object
- Object
- Stackd::Client
- Defined in:
- lib/stackd/client.rb
Instance Method Summary collapse
- #auth_requests ⇒ Object
-
#initialize(attrs) ⇒ Client
constructor
A new instance of Client.
- #tokens ⇒ Object
Methods included from Stackd::Concerns::RequireAttr
Methods included from Stackd::Concerns::TattrAccessor
Constructor Details
#initialize(attrs) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/stackd/client.rb', line 9 def initialize attrs attrs.each do |attr, val| public_send :"#{attr}=", val end begin require_attr! :id, :secret rescue Concerns::RequireAttr::AttrNotSetError => e raise ArgumentError.new e. end end |
Instance Method Details
#auth_requests ⇒ Object
21 22 23 |
# File 'lib/stackd/client.rb', line 21 def auth_requests @auth_requests ||= Util::Portal.new self, AuthRequest end |
#tokens ⇒ Object
25 26 27 |
# File 'lib/stackd/client.rb', line 25 def tokens @tokens ||= Util::Portal.new self, Token end |