Class: RubyBreaker::TypeDefs::BlockType
- Defined in:
- lib/rubybreaker/type/type.rb
Overview
This class represents a block (in a method). It has zero or more argument types, nested block type (optional), and a return type.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#arg_types ⇒ Object
This accessor sets/gets the argument types for this block type.
-
#blk_type ⇒ Object
This accessor sets/gets the block type for this block type.
-
#ret_type ⇒ Object
This accessor sets/gets the return type for this block type.
Attributes inherited from Type
Instance Method Summary collapse
-
#initialize(arg_types = [], blk_type = nil, ret_type = nil, *args) ⇒ BlockType
constructor
A new instance of BlockType.
Methods inherited from Type
Constructor Details
#initialize(arg_types = [], blk_type = nil, ret_type = nil, *args) ⇒ BlockType
Returns a new instance of BlockType.
165 166 167 168 169 170 |
# File 'lib/rubybreaker/type/type.rb', line 165 def initialize(arg_types=[],blk_type=nil,ret_type=nil,*args) super(*args) @arg_types = arg_types @blk_type = blk_type @ret_type = ret_type end |
Instance Attribute Details
#arg_types ⇒ Object
This accessor sets/gets the argument types for this block type.
157 158 159 |
# File 'lib/rubybreaker/type/type.rb', line 157 def arg_types @arg_types end |
#blk_type ⇒ Object
This accessor sets/gets the block type for this block type.
160 161 162 |
# File 'lib/rubybreaker/type/type.rb', line 160 def blk_type @blk_type end |
#ret_type ⇒ Object
This accessor sets/gets the return type for this block type.
163 164 165 |
# File 'lib/rubybreaker/type/type.rb', line 163 def ret_type @ret_type end |