Class: Duby::JVM::Types::Intrinsic
- Includes:
- ArgumentConversion
- Defined in:
- lib/duby/jvm/types/methods.rb
Instance Attribute Summary collapse
-
#argument_types ⇒ Object
readonly
Returns the value of attribute argument_types.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
Instance Method Summary collapse
- #actual_return_type ⇒ Object
- #call(builder, ast, expression) ⇒ Object
- #constructor? ⇒ Boolean
- #declaring_class ⇒ Object
- #exceptions ⇒ Object
-
#initialize(klass, name, args, type, &block) ⇒ Intrinsic
constructor
A new instance of Intrinsic.
Methods included from ArgumentConversion
Constructor Details
#initialize(klass, name, args, type, &block) ⇒ Intrinsic
Returns a new instance of Intrinsic.
32 33 34 35 36 37 38 39 |
# File 'lib/duby/jvm/types/methods.rb', line 32 def initialize(klass, name, args, type, &block) raise ArgumentError, "Block required" unless block_given? @class = klass @name = name @argument_types = args @return_type = type @block = block end |
Instance Attribute Details
#argument_types ⇒ Object (readonly)
Returns the value of attribute argument_types.
30 31 32 |
# File 'lib/duby/jvm/types/methods.rb', line 30 def argument_types @argument_types end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
30 31 32 |
# File 'lib/duby/jvm/types/methods.rb', line 30 def name @name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
30 31 32 |
# File 'lib/duby/jvm/types/methods.rb', line 30 def return_type @return_type end |
Instance Method Details
#actual_return_type ⇒ Object
57 58 59 |
# File 'lib/duby/jvm/types/methods.rb', line 57 def actual_return_type return_type end |
#call(builder, ast, expression) ⇒ Object
41 42 43 |
# File 'lib/duby/jvm/types/methods.rb', line 41 def call(builder, ast, expression) @block.call(builder, ast, expression) end |
#constructor? ⇒ Boolean
49 50 51 |
# File 'lib/duby/jvm/types/methods.rb', line 49 def constructor? false end |
#declaring_class ⇒ Object
45 46 47 |
# File 'lib/duby/jvm/types/methods.rb', line 45 def declaring_class @class end |
#exceptions ⇒ Object
53 54 55 |
# File 'lib/duby/jvm/types/methods.rb', line 53 def exceptions [] end |