Class: Tradier::Calendar
Class Method Summary collapse
-
.from_response(body = {}) ⇒ Tradier::Calendar
Create a new [Tradier::Calendar] instance from a response.
Instance Method Summary collapse
Methods inherited from Base
#[], #attr_equal, attr_reader, #attrs, #attrs_equal, #initialize, #update
Constructor Details
This class inherits a constructor from Tradier::Base
Class Method Details
.from_response(body = {}) ⇒ Tradier::Calendar
Create a new [Tradier::Calendar] instance from a response
10 11 12 |
# File 'lib/tradier/calendar.rb', line 10 def self.from_response(body={}) new(body) end |
Instance Method Details
#month ⇒ Object
14 15 16 |
# File 'lib/tradier/calendar.rb', line 14 def month @_month ||= @attrs[:calendar][:days][:month] end |
#year ⇒ Object
18 19 20 |
# File 'lib/tradier/calendar.rb', line 18 def year @_year ||= @attrs[:calendar][:days][:year] end |