Class: Ynaby::User
Instance Attribute Summary collapse
-
#api_token ⇒ Object
readonly
Returns the value of attribute api_token.
Instance Method Summary collapse
- #budget(id) ⇒ Object
- #budgets ⇒ Object
-
#initialize(api_token) ⇒ User
constructor
A new instance of User.
Methods inherited from Base
Constructor Details
#initialize(api_token) ⇒ User
Returns a new instance of User.
5 6 7 |
# File 'lib/ynaby/user.rb', line 5 def initialize(api_token) @api_token = api_token end |
Instance Attribute Details
#api_token ⇒ Object (readonly)
Returns the value of attribute api_token.
3 4 5 |
# File 'lib/ynaby/user.rb', line 3 def api_token @api_token end |
Instance Method Details
#budget(id) ⇒ Object
16 17 18 |
# File 'lib/ynaby/user.rb', line 16 def budget(id) budgets.find { |budget| budget.id == id } end |