lib/hss.rb
def handle(input)
      @patterns.each do |pattern|
        next unless @parser.check(input, pattern['short'])
        return @parser.parse(pattern['long'])
      end
      raise NameError, "Couldn't find a matching host for: #{input}"
    end
##
# Check patterns for a match and parse the long form
Check patterns for a match and parse the long form
Check patterns for a match and parse the long form
def handle(input)
      @patterns.each do |pattern|
        next unless @parser.check(input, pattern['short'])
        return @parser.parse(pattern['long'])
      end
      raise NameError, "Couldn't find a matching host for: #{input}"
    end
def handle ( input ) @patterns . each do | pattern | next unless @parser . check ( input , pattern [ 'short' ] ) return @parser . parse ( pattern [ 'long' ] ) end raise NameError , "Couldn't find a matching host for: #{input}" end
Check patterns for a match and parse the long form
Check patterns for a match and parse the long form
input