Class: Kisaweb::Club
Instance Attribute Summary collapse
-
#abbreviation ⇒ Object
Returns the value of attribute abbreviation.
-
#area ⇒ Object
Returns the value of attribute area.
-
#contact_email ⇒ Object
Returns the value of attribute contact_email.
-
#name ⇒ Object
Returns the value of attribute name.
-
#reference_number ⇒ Object
Returns the value of attribute reference_number.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#abbreviation ⇒ Object
Returns the value of attribute abbreviation.
3 4 5 |
# File 'lib/kisaweb/club.rb', line 3 def abbreviation @abbreviation end |
#area ⇒ Object
Returns the value of attribute area.
3 4 5 |
# File 'lib/kisaweb/club.rb', line 3 def area @area end |
#contact_email ⇒ Object
Returns the value of attribute contact_email.
3 4 5 |
# File 'lib/kisaweb/club.rb', line 3 def contact_email @contact_email end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/kisaweb/club.rb', line 3 def name @name end |
#reference_number ⇒ Object
Returns the value of attribute reference_number.
3 4 5 |
# File 'lib/kisaweb/club.rb', line 3 def reference_number @reference_number end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/kisaweb/club.rb', line 3 def url @url end |
Class Method Details
.all ⇒ Object
6 7 8 |
# File 'lib/kisaweb/club.rb', line 6 def self.all @@all ||= find_all end |
.find(abbr) ⇒ Object
10 11 12 13 14 |
# File 'lib/kisaweb/club.rb', line 10 def self.find(abbr) all.select do |club| club.abbreviation.to_s.downcase == abbr.to_s.downcase end.first end |
.from_csv_array(arr) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/kisaweb/club.rb', line 16 def self.from_csv_array(arr) club = new club.abbreviation = arr[0] club.name = arr[1] club.area = arr[2] club.url = arr[3] club.contact_email = arr[4] club.reference_number = arr[8] club end |
Instance Method Details
#attributes ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kisaweb/club.rb', line 27 def attributes { :abbreviation => abbreviation, :name => name, :area => area, :url => url, :contact_email => contact_email, :reference_number => reference_number } end |