class Sekken::Resolver

Constants

URL_PATTERN
XML_PATTERN

Public Class Methods

new(http) click to toggle source
# File lib/sekken/resolver.rb, line 7
def initialize(http)
  @http = http
end

Public Instance Methods

resolve(location) click to toggle source
# File lib/sekken/resolver.rb, line 11
def resolve(location)
  case location
    when URL_PATTERN then @http.get(location)
    when XML_PATTERN then location
    else                  File.read(location)
  end
end