Class: CalendariumRomanum::Remote::V0::UriScheme
- Inherits:
-
Object
- Object
- CalendariumRomanum::Remote::V0::UriScheme
- Defined in:
- lib/calendarium-romanum/remote/v0/uri_scheme.rb
Instance Method Summary collapse
- #day(date) ⇒ Object
-
#initialize(calendar_uri) ⇒ UriScheme
constructor
A new instance of UriScheme.
- #year(year) ⇒ Object
Constructor Details
#initialize(calendar_uri) ⇒ UriScheme
Returns a new instance of UriScheme.
5 6 7 8 9 |
# File 'lib/calendarium-romanum/remote/v0/uri_scheme.rb', line 5 def initialize(calendar_uri) @calendar_uri = calendar_uri + (calendar_uri.end_with?('/') ? '' : '/') end |
Instance Method Details
#day(date) ⇒ Object
11 12 13 |
# File 'lib/calendarium-romanum/remote/v0/uri_scheme.rb', line 11 def day(date) @calendar_uri + "#{date.year}/#{date.month}/#{date.day}" end |
#year(year) ⇒ Object
15 16 17 |
# File 'lib/calendarium-romanum/remote/v0/uri_scheme.rb', line 15 def year(year) @calendar_uri + year.to_s end |