Exception: Pione::Lang::MethodNotFound
- Inherits:
-
StandardError
- Object
- StandardError
- Pione::Lang::MethodNotFound
- Defined in:
- lib/pione/lang/lang-exception.rb
Overview
MethodNotFound is an exception class for the case of method missing.
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
Instance Method Summary collapse
-
#initialize(env, name, receiver, arguments) ⇒ MethodNotFound
constructor
Creates an exception.
- #message ⇒ Object
Constructor Details
#initialize(env, name, receiver, arguments) ⇒ MethodNotFound
Creates an exception.
191 192 193 194 195 196 |
# File 'lib/pione/lang/lang-exception.rb', line 191 def initialize(env, name, receiver, arguments) @env = env @name = name @receiver = receiver @arguments = arguments end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
180 181 182 |
# File 'lib/pione/lang/lang-exception.rb', line 180 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
178 179 180 |
# File 'lib/pione/lang/lang-exception.rb', line 178 def name @name end |
#receiver ⇒ Object (readonly)
Returns the value of attribute receiver.
179 180 181 |
# File 'lib/pione/lang/lang-exception.rb', line 179 def receiver @receiver end |
Instance Method Details
#message ⇒ Object
198 199 200 201 202 |
# File 'lib/pione/lang/lang-exception.rb', line 198 def rec_type = @receiver.pione_type(@env) arg_types = @arguments.map{|arg| arg.pione_type(@env)}.join(" -> ") "PIONE method \"%s\" is not found: %s. %s" % [@name, rec_type, arg_types] end |