Sha256: a2dcd3d7dc6ce9d313945014eaf608f1b278ab022667aa94002023130b155332

Contents?: true

Size: 510 Bytes

Versions: 8

Compression:

Stored size: 510 Bytes

Contents

module Almanack
  module EventSource
    class IcalFeed
      extend Forwardable

      attr_reader :ical, :connection

      def_delegators :ical, :events_between, :serialized_between

      def initialize(url, connection:)
        @url = url
        @connection = connection
      end

      def ical
        @ical ||= Ical.from(response.body)
      end

      private

      def uri
        Addressable::URI.parse(@url)
      end

      def response
        connection.get(uri)
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
almanack-1.3.1 lib/almanack/event_source/ical_feed.rb
almanack-1.3.0 lib/almanack/event_source/ical_feed.rb
almanack-1.3.0.rc1 lib/almanack/event_source/ical_feed.rb
almanack-1.2.1 lib/almanack/event_source/ical_feed.rb
almanack-1.2.0 lib/almanack/event_source/ical_feed.rb
almanack-1.1.5 lib/almanack/event_source/ical_feed.rb
almanack-1.1.3 lib/almanack/event_source/ical_feed.rb
almanack-1.1.3.rc1 lib/almanack/event_source/ical_feed.rb