Class: Wowr::Classes::CommonCalendar
- Inherits:
-
Object
- Object
- Wowr::Classes::CommonCalendar
- Defined in:
- lib/wowr/calendar.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#calendar_type ⇒ Object
readonly
Returns the value of attribute calendar_type.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(json, api = nil) ⇒ CommonCalendar
constructor
A new instance of CommonCalendar.
Constructor Details
#initialize(json, api = nil) ⇒ CommonCalendar
Returns a new instance of CommonCalendar.
9 10 11 12 13 14 |
# File 'lib/wowr/calendar.rb', line 9 def initialize(json, api = nil) @summary = json["summary"] @calendar_type = json["calendarType"] @start = Time.at((json["start"] / 1000).floor) @icon = json["icon"] end |
Instance Attribute Details
#calendar_type ⇒ Object (readonly)
Returns the value of attribute calendar_type.
7 8 9 |
# File 'lib/wowr/calendar.rb', line 7 def calendar_type @calendar_type end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
7 8 9 |
# File 'lib/wowr/calendar.rb', line 7 def icon @icon end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
7 8 9 |
# File 'lib/wowr/calendar.rb', line 7 def start @start end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
7 8 9 |
# File 'lib/wowr/calendar.rb', line 7 def summary @summary end |