Class: TopRankedSkiResorts::Resort
- Inherits:
-
Object
- Object
- TopRankedSkiResorts::Resort
- Defined in:
- lib/top_ranked_ski_resorts/resort.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#acreage ⇒ Object
Returns the value of attribute acreage.
-
#airport ⇒ Object
Returns the value of attribute airport.
-
#halfpipes ⇒ Object
Returns the value of attribute halfpipes.
-
#lifts ⇒ Object
Returns the value of attribute lifts.
-
#longest_run ⇒ Object
Returns the value of attribute longest_run.
-
#place ⇒ Object
Returns the value of attribute place.
-
#protip ⇒ Object
Returns the value of attribute protip.
-
#rank ⇒ Object
Returns the value of attribute rank.
-
#score ⇒ Object
Returns the value of attribute score.
-
#state ⇒ Object
Returns the value of attribute state.
-
#summit_elevation ⇒ Object
Returns the value of attribute summit_elevation.
-
#terrain_parks ⇒ Object
Returns the value of attribute terrain_parks.
-
#total_runs ⇒ Object
Returns the value of attribute total_runs.
-
#true_snowfall ⇒ Object
Returns the value of attribute true_snowfall.
-
#vertical_drop ⇒ Object
Returns the value of attribute vertical_drop.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Resort
constructor
A new instance of Resort.
- #save ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Resort
Returns a new instance of Resort.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 8 def initialize(attributes = {}) @rank = attributes[:rank] @place = attributes[:place] @state = attributes[:state] @airport = attributes[:airport] @score = attributes[:score] @acreage = attributes[:acreage] @summit_elevation = attributes[:summit_elevation] @vertical_drop = attributes[:vertical_drop] @lifts = attributes[:lifts] @true_snowfall = attributes[:true_snowfall] @total_runs = attributes[:total_runs] @longest_run = attributes[:longest_run] @terrain_parks = attributes[:terrain_parks] @halfpipes = attributes[:halfpipes] @protip = attributes[:protip] save end |
Instance Attribute Details
#acreage ⇒ Object
Returns the value of attribute acreage.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def acreage @acreage end |
#airport ⇒ Object
Returns the value of attribute airport.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def airport @airport end |
#halfpipes ⇒ Object
Returns the value of attribute halfpipes.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def halfpipes @halfpipes end |
#lifts ⇒ Object
Returns the value of attribute lifts.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def lifts @lifts end |
#longest_run ⇒ Object
Returns the value of attribute longest_run.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def longest_run @longest_run end |
#place ⇒ Object
Returns the value of attribute place.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def place @place end |
#protip ⇒ Object
Returns the value of attribute protip.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def protip @protip end |
#rank ⇒ Object
Returns the value of attribute rank.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def rank @rank end |
#score ⇒ Object
Returns the value of attribute score.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def score @score end |
#state ⇒ Object
Returns the value of attribute state.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def state @state end |
#summit_elevation ⇒ Object
Returns the value of attribute summit_elevation.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def summit_elevation @summit_elevation end |
#terrain_parks ⇒ Object
Returns the value of attribute terrain_parks.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def terrain_parks @terrain_parks end |
#total_runs ⇒ Object
Returns the value of attribute total_runs.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def total_runs @total_runs end |
#true_snowfall ⇒ Object
Returns the value of attribute true_snowfall.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def true_snowfall @true_snowfall end |
#vertical_drop ⇒ Object
Returns the value of attribute vertical_drop.
3 4 5 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 3 def vertical_drop @vertical_drop end |
Class Method Details
.all ⇒ Object
27 28 29 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 27 def self.all @@all end |
Instance Method Details
#save ⇒ Object
31 32 33 |
# File 'lib/top_ranked_ski_resorts/resort.rb', line 31 def save @@all << self end |