Method: Tap::Env#resolve

Defined in:
lib/tap/env.rb

#resolve(const_str, type = nil) ⇒ Object



94
95
96
97
98
99
100
101
# File 'lib/tap/env.rb', line 94

def resolve(const_str, type=nil)
  matches = match(const_str, type)
  case matches.length
  when 0 then raise "unresolvable constant: #{const_str.inspect}"
  when 1 then matches.at(0)
  else raise "multiple matching constants: #{const_str.inspect} (#{matches.join(', ')})"
  end
end