Class: HonStats::Classes::SimpleClan

Inherits:
Object
  • Object
show all
Defined in:
lib/honstats/character.rb

Overview

Consilidated clan info

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SimpleClan

Returns a new instance of SimpleClan.



124
125
126
127
128
129
130
# File 'lib/honstats/character.rb', line 124

def initialize(data)
  @id =       HonStats::API.get_data("clan_id", data).to_i
  @name =     HonStats::API.get_data("name", data).to_s
  @tag =      HonStats::API.get_data("tag", data).to_s
  @rank =     HonStats::API.get_data("rank", data).to_s
  @icon =     HonStats::API.get_data("file_name", data).to_s
end

Instance Attribute Details

#iconObject (readonly)

Returns the value of attribute icon.



122
123
124
# File 'lib/honstats/character.rb', line 122

def icon
  @icon
end

#idObject (readonly)

Returns the value of attribute id.



122
123
124
# File 'lib/honstats/character.rb', line 122

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



122
123
124
# File 'lib/honstats/character.rb', line 122

def name
  @name
end

#rankObject (readonly)

Returns the value of attribute rank.



122
123
124
# File 'lib/honstats/character.rb', line 122

def rank
  @rank
end

#tagObject (readonly)

Returns the value of attribute tag.



122
123
124
# File 'lib/honstats/character.rb', line 122

def tag
  @tag
end