Sha256: bd4db43422182149bf69bdc5b0f9881d891055400fb2af4884a5c38f3d0ea482

Contents?: true

Size: 293 Bytes

Versions: 5

Compression:

Stored size: 293 Bytes

Contents

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

5 entries across 5 versions & 1 rubygems

Version Path
event_cal-1.2.3 lib/event_cal/event.rb
event_cal-1.2.2 lib/event_cal/event.rb
event_cal-1.2.1 lib/event_cal/event.rb
event_cal-1.2 lib/event_cal/event.rb
event_cal-1.1 lib/event_cal/event.rb