class Todoplicator::FindAdapter

Public Class Methods

call(*args) click to toggle source
# File lib/todoplicator/find_adapter.rb, line 3
def self.call(*args)
  new(*args).call
end
new(location) click to toggle source
# File lib/todoplicator/find_adapter.rb, line 7
def initialize(location)
  @location = location
end

Public Instance Methods

call() click to toggle source
# File lib/todoplicator/find_adapter.rb, line 11
def call
  klass.new(target)
end

Private Instance Methods

klass() click to toggle source
# File lib/todoplicator/find_adapter.rb, line 17
def klass
  AdapterRegistry.instance.for(@location[/^([^\/]+)/, 1])
end
target() click to toggle source
# File lib/todoplicator/find_adapter.rb, line 21
def target
  @location[/^[^\/]+\/(.+)$/, 1]
end