Exception: Truck::AutoloadError

Inherits:
NameError
  • Object
show all
Defined in:
lib/truck/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(const:, rb_file:) ⇒ AutoloadError

Returns a new instance of AutoloadError.



87
88
89
90
# File 'lib/truck/context.rb', line 87

def initialize(const:, rb_file:)
  @const   = const
  @rb_file = rb_file
end

Instance Attribute Details

#constObject (readonly)

Returns the value of attribute const.



85
86
87
# File 'lib/truck/context.rb', line 85

def const
  @const
end

Instance Method Details

#messageObject



92
93
94
# File 'lib/truck/context.rb', line 92

def message
  "Expected #{rb_file} to define #{const}"
end