Class: LeagueOfLegends::DTO::MessageOfDay

Inherits:
Object
  • Object
show all
Defined in:
lib/league_of_legends/dto/message_of_day.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ MessageOfDay

Returns a new instance of MessageOfDay.



11
12
13
14
15
16
17
# File 'lib/league_of_legends/dto/message_of_day.rb', line 11

def initialize attributes
  return if attributes.nil?

  @create_date = Time.at(attributes[:createDate]/1000)
  @message = attributes[:message]
  @version = attributes[:version]
end

Instance Attribute Details

#create_dateObject (readonly)

Returns the value of attribute create_date.



9
10
11
# File 'lib/league_of_legends/dto/message_of_day.rb', line 9

def create_date
  @create_date
end

#messageObject (readonly)

Returns the value of attribute message.



9
10
11
# File 'lib/league_of_legends/dto/message_of_day.rb', line 9

def message
  @message
end

#versionObject (readonly)

Returns the value of attribute version.



9
10
11
# File 'lib/league_of_legends/dto/message_of_day.rb', line 9

def version
  @version
end

Class Method Details

.versionObject



5
6
7
# File 'lib/league_of_legends/dto/message_of_day.rb', line 5

def self.version
  ::LeagueOfLegends::DTO::Team.version
end