Exception: Pione::Lang::MethodInterfaceError
- Inherits:
-
StandardError
- Object
- StandardError
- Pione::Lang::MethodInterfaceError
- Defined in:
- lib/pione/lang/pione-method.rb
Overview
MethodInterfaceError is a exception for method interface mismatching.
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#types ⇒ Object
readonly
Returns the value of attribute types.
-
#values ⇒ Object
readonly
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(kind, name, types, values) ⇒ MethodInterfaceError
constructor
A new instance of MethodInterfaceError.
- #message ⇒ Object
Constructor Details
#initialize(kind, name, types, values) ⇒ MethodInterfaceError
Returns a new instance of MethodInterfaceError.
18 19 20 21 22 23 |
# File 'lib/pione/lang/pione-method.rb', line 18 def initialize(kind, name, types, values) @kind = kind @name = name @types = types @values = values end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
5 6 7 |
# File 'lib/pione/lang/pione-method.rb', line 5 def kind @kind end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/pione/lang/pione-method.rb', line 6 def name @name end |
#types ⇒ Object (readonly)
Returns the value of attribute types.
7 8 9 |
# File 'lib/pione/lang/pione-method.rb', line 7 def types @types end |
#values ⇒ Object (readonly)
Returns the value of attribute values.
8 9 10 |
# File 'lib/pione/lang/pione-method.rb', line 8 def values @values end |
Instance Method Details
#message ⇒ Object
25 26 27 28 29 |
# File 'lib/pione/lang/pione-method.rb', line 25 def types = @types.map{|type| type}.join(" -> ") values = @values.map{|value| value.inspect}.join(" -> ") '"%s" expected %s but got %s' % [@name, types, values] end |