class AcnhCritterpedia::Critter
Attributes
catch_phrase[R]
is_all_day[R]
is_all_year[R]
location[R]
month_range[RW]
name[R]
time_range[R]
Public Class Methods
new(hash)
click to toggle source
# File lib/acnh_critterpedia/critter.rb, line 6 def initialize(hash) hash.each do |key, value| self.instance_variable_set("@#{key}", value) end end
Public Instance Methods
print_attributes()
click to toggle source
# File lib/acnh_critterpedia/critter.rb, line 12 def print_attributes puts <<-CRITTER_INFO #{"Name:".light_cyan} #{name.capitalize} #{"Months Available:".light_cyan} #{is_all_year ? "All Year" : month_range} #{"Hours Available:".light_cyan} #{is_all_day ? "All Day" : time_range} #{"Location:".light_cyan} #{location == nil ? "Ocean" : location} #{"Catch Phrase:".light_cyan} #{catch_phrase} CRITTER_INFO end