Class: VacationRentalsIcalAdapters::Adapters::XmlArkianeAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/vacation_rentals_ical_adapters/adapters/xml_arkiane_adapter.rb

Instance Method Summary collapse

Instance Method Details

#applicable?(body:, source:) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/vacation_rentals_ical_adapters/adapters/xml_arkiane_adapter.rb', line 9

def applicable?(body:, source:)
  URI(source.to_s).host == ARKIANE_XML_HOST
end

#to_ical(body) ⇒ Object



13
14
15
16
# File 'lib/vacation_rentals_ical_adapters/adapters/xml_arkiane_adapter.rb', line 13

def to_ical(body)
  events = parse_events(body)
  VacationRentalsIcalAdapters::IcalConverter.to_ical(events)
end