Class: Mirah::JVM::Types::Macro
- Inherits:
-
Object
- Object
- Mirah::JVM::Types::Macro
- Defined in:
- lib/mirah/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
- #declaring_class ⇒ Object
-
#initialize(klass, name, args, &block) ⇒ Macro
constructor
A new instance of Macro.
Constructor Details
#initialize(klass, name, args, &block) ⇒ Macro
Returns a new instance of Macro.
136 137 138 139 140 141 142 143 |
# File 'lib/mirah/jvm/types/methods.rb', line 136 def initialize(klass, name, args, &block) raise ArgumentError, "Block required" unless block_given? @class = klass @name = name @argument_types = args raise ArgumentError unless args.all? @return_type = InlineCode.new(block.to_java(NodeBuilder)) end |
Instance Attribute Details
#argument_types ⇒ Object (readonly)
Returns the value of attribute argument_types.
134 135 136 |
# File 'lib/mirah/jvm/types/methods.rb', line 134 def argument_types @argument_types end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
134 135 136 |
# File 'lib/mirah/jvm/types/methods.rb', line 134 def name @name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
134 135 136 |
# File 'lib/mirah/jvm/types/methods.rb', line 134 def return_type @return_type end |
Instance Method Details
#declaring_class ⇒ Object
145 146 147 |
# File 'lib/mirah/jvm/types/methods.rb', line 145 def declaring_class @class end |