Sha256: a1ce7f96b708f5095befd59b16d04aee39b1fb39c6c5752dce15f8c76a685a9f

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

module CalendariumRomanum
  module Remote
    module V0
      class UriScheme
        def initialize(calendar_uri)
          @calendar_uri =
            calendar_uri +
            (calendar_uri.end_with?('/') ? '' : '/')
        end

        def day(date)
          @calendar_uri + "#{date.year}/#{date.month}/#{date.day}"
        end

        def year(year)
          @calendar_uri + year.to_s
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
calendarium-romanum-remote-0.3.0 lib/calendarium-romanum/remote/v0/uri_scheme.rb
calendarium-romanum-remote-0.2.0 lib/calendarium-romanum/remote/v0/uri_scheme.rb