Class: VacationRentalsIcalAdapters::Adapters::IcalAdapter

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

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


5
6
7
# File 'lib/vacation_rentals_ical_adapters/adapters/ical_adapter.rb', line 5

def applicable?(body:, source:)
  Icalendar::Calendar.parse(body).any?
end

#to_ical(body) ⇒ Object



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

def to_ical(body)
  body
end