Sha256: 9d4308a2f35884292fab16713253b8f588888e64fc4e0fcd59940444f38156f6

Contents?: true

Size: 314 Bytes

Versions: 6

Compression:

Stored size: 314 Bytes

Contents

require 'event_cal'

class EventCal::Event
  attr_accessor :held_on, :name
  def initialize(date = Date.today)
    @held_on = date
  end

  def self.all
    []
  end

  def self.fetch_events(calendar)
    all.select do |event|
      (calendar.start_on .. calendar.end_on).include?(event.held_on)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
event_cal-2.0.2 lib/event_cal/event.rb
event_cal-2.0.1 lib/event_cal/event.rb
event_cal-2.0.0 lib/event_cal/event.rb
event_cal-1.3.0 lib/event_cal/event.rb
event_cal-1.2.5 lib/event_cal/event.rb
event_cal-1.2.4 lib/event_cal/event.rb