Class: IntermatScrape::Wrestler

Inherits:
Object
  • Object
show all
Defined in:
lib/intermat_scrape/wrestler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_standingObject

Returns the value of attribute class_standing.



2
3
4
# File 'lib/intermat_scrape/wrestler.rb', line 2

def class_standing
  @class_standing
end

#conferenceObject

Returns the value of attribute conference.



2
3
4
# File 'lib/intermat_scrape/wrestler.rb', line 2

def conference
  @conference
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/intermat_scrape/wrestler.rb', line 2

def name
  @name
end

#rankObject

Returns the value of attribute rank.



2
3
4
# File 'lib/intermat_scrape/wrestler.rb', line 2

def rank
  @rank
end

#schoolObject

Returns the value of attribute school.



2
3
4
# File 'lib/intermat_scrape/wrestler.rb', line 2

def school
  @school
end

#weight_classObject

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_sObject

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