Class: QuakeliveApi::Base
- Inherits:
-
Object
- Object
- QuakeliveApi::Base
- Defined in:
- lib/quakelive_api/base.rb
Direct Known Subclasses
Profile::Awards::Base, Profile::Statistics, Profile::Summary
Instance Attribute Summary collapse
-
#player_name ⇒ Object
Returns the value of attribute player_name.
Instance Method Summary collapse
-
#initialize(player_name) ⇒ Base
constructor
A new instance of Base.
- #inspect ⇒ Object
Constructor Details
#initialize(player_name) ⇒ Base
Returns a new instance of Base.
5 6 7 8 9 10 |
# File 'lib/quakelive_api/base.rb', line 5 def initialize(player_name) @player_name = player_name set_parser Nokogiri::HTML(get) setup_variables! end |
Instance Attribute Details
#player_name ⇒ Object
Returns the value of attribute player_name.
3 4 5 |
# File 'lib/quakelive_api/base.rb', line 3 def player_name @player_name end |
Instance Method Details
#inspect ⇒ Object
12 13 14 15 16 17 |
# File 'lib/quakelive_api/base.rb', line 12 def inspect "#{self.class}:#{object_id}\n" + instance_variables.map do |v| next if v.to_s == "@parser" "#{v}=#{instance_variable_get(v).inspect}" end.compact.join("\n") end |