Class: IntermatScrape::Wrestler
- Inherits:
-
Object
- Object
- IntermatScrape::Wrestler
- Defined in:
- lib/intermat_scrape/wrestler.rb
Instance Attribute Summary collapse
-
#class_standing ⇒ Object
Returns the value of attribute class_standing.
-
#conference ⇒ Object
Returns the value of attribute conference.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rank ⇒ Object
Returns the value of attribute rank.
-
#school ⇒ Object
Returns the value of attribute school.
-
#weight_class ⇒ Object
Returns the value of attribute weight_class.
Instance Method Summary collapse
-
#initialize(wrestler_hash) ⇒ Wrestler
constructor
A new instance of Wrestler.
-
#to_s ⇒ Object
TODO move to Cli.class.
Constructor Details
#initialize(wrestler_hash) ⇒ Wrestler
Returns a new instance of Wrestler.
4 5 6 |
# File 'lib/intermat_scrape/wrestler.rb', line 4 def initialize(wrestler_hash) wrestler_hash.each { |k, v| self.send("#{k}=", v) } end |
Instance Attribute Details
#class_standing ⇒ Object
Returns the value of attribute class_standing.
2 3 4 |
# File 'lib/intermat_scrape/wrestler.rb', line 2 def class_standing @class_standing end |
#conference ⇒ Object
Returns the value of attribute conference.
2 3 4 |
# File 'lib/intermat_scrape/wrestler.rb', line 2 def conference @conference end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/intermat_scrape/wrestler.rb', line 2 def name @name end |
#rank ⇒ Object
Returns the value of attribute rank.
2 3 4 |
# File 'lib/intermat_scrape/wrestler.rb', line 2 def rank @rank end |
#school ⇒ Object
Returns the value of attribute school.
2 3 4 |
# File 'lib/intermat_scrape/wrestler.rb', line 2 def school @school end |
#weight_class ⇒ Object
Returns the value of attribute weight_class.
2 3 4 |
# File 'lib/intermat_scrape/wrestler.rb', line 2 def weight_class @weight_class end |
Instance Method Details
#to_s ⇒ Object
TODO move to Cli.class
9 10 11 12 13 14 15 16 |
# File 'lib/intermat_scrape/wrestler.rb', line 9 def to_s puts '' puts "----------- #{name} ##{rank} -----------".on_blue puts '' puts "School:".colorize(:light_cyan).ljust(20).concat(@school) puts "Class:".colorize(:light_cyan).ljust(20).concat(@class_standing) puts "Conference:".colorize(:light_cyan).ljust(20).concat(@conference) end |