class OrlandoEvents::Event
Attributes
events[RW]
month_url[RW]
name[RW]
Public Class Methods
all()
click to toggle source
# File lib/orlando_events/event.rb, line 34 def self.all @@all end
create_from_collection(months_array)
click to toggle source
# File lib/orlando_events/event.rb, line 14 def self.create_from_collection(months_array) months_array.each do |month| self.new(month) # binding.pry end end
new(month_hash)
click to toggle source
# File lib/orlando_events/event.rb, line 6 def initialize(month_hash) @events = [] month_hash.each do |k,v| self.send "#{k}=", v end @@all << self end
Public Instance Methods
add_event_details(events_array)
click to toggle source
# File lib/orlando_events/event.rb, line 21 def add_event_details(events_array) events_array.each do |event_hash| OrlandoEvents::MonthEvents.new(event_hash, self) end self end
add_events(month_events)
click to toggle source
# File lib/orlando_events/event.rb, line 28 def add_events(month_events) month_events.month = self if !month_events.month @events << month_events # binding.pry end