Class: Wowr::Classes::CommonCalendar

Inherits:
Object
  • Object
show all
Defined in:
lib/wowr/calendar.rb

Direct Known Subclasses

UserCommonCalendar, WorldCalendar

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject (readonly)

Returns the value of attribute calendar_type.



7
8
9
# File 'lib/wowr/calendar.rb', line 7

def calendar_type
  @calendar_type
end

#iconObject (readonly)

Returns the value of attribute icon.



7
8
9
# File 'lib/wowr/calendar.rb', line 7

def icon
  @icon
end

#startObject (readonly)

Returns the value of attribute start.



7
8
9
# File 'lib/wowr/calendar.rb', line 7

def start
  @start
end

#summaryObject (readonly)

Returns the value of attribute summary.



7
8
9
# File 'lib/wowr/calendar.rb', line 7

def summary
  @summary
end