Exception: Lingo::NameNotFoundError

Inherits:
LingoError
  • Object
show all
Defined in:
lib/lingo/error.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (NameNotFoundError) initialize(klass, name)

A new instance of NameNotFoundError



168
169
170
# File 'lib/lingo/error.rb', line 168

def initialize(klass, name)
  @klass, @name = klass, name
end

Instance Attribute Details

- (Object) klass (readonly)

Returns the value of attribute klass



166
167
168
# File 'lib/lingo/error.rb', line 166

def klass
  @klass
end

- (Object) name (readonly)

Returns the value of attribute name



166
167
168
# File 'lib/lingo/error.rb', line 166

def name
  @name
end

Instance Method Details

- (Object) to_s



172
173
174
# File 'lib/lingo/error.rb', line 172

def to_s
  "No such #{klass.name.split('::').last} type `#{name}'."
end