class VacationRentalsIcalAdapters::Adapters
Public Class Methods
adapter_for(body:, source:)
click to toggle source
# File lib/vacation_rentals_ical_adapters/adapters.rb, line 4 def self.adapter_for(body:, source:) registry.find_adapter do |adapter| adapter.applicable?(body: body, source: source) end end
Private Class Methods
register(adapter)
click to toggle source
# File lib/vacation_rentals_ical_adapters/adapters.rb, line 15 def self.register(adapter) registry.register(adapter) end
registry()
click to toggle source
# File lib/vacation_rentals_ical_adapters/adapters.rb, line 10 def self.registry @registry ||= VacationRentalsIcalAdapters::Registry.new end