class Territorial::Parser
Constants
- TOKEN
Attributes
input[R]
Public Class Methods
new(input)
click to toggle source
# File lib/territorial.rb, line 120 def initialize(input) @input = input end
Public Instance Methods
accept()
click to toggle source
# File lib/territorial.rb, line 128 def accept @accept ||= tokens.reject { |prefix, code| prefix == '-' }.map { |prefix, code| code } end
reject()
click to toggle source
# File lib/territorial.rb, line 136 def reject @reject ||= tokens.select { |prefix, code| prefix == '-' }.map { |prefix, code| code } end
tokens()
click to toggle source
# File lib/territorial.rb, line 124 def tokens @tokens ||= input.scan(TOKEN) end