Class: Types::Block
Instance Attribute Summary collapse
-
#argument_types ⇒ Object
readonly
Returns the value of attribute argument_types.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
Instance Method Summary collapse
- #composite? ⇒ Boolean
-
#initialize(argument_types, return_type) ⇒ Block
constructor
A new instance of Block.
- #to_s ⇒ Object
Methods included from Generic
Constructor Details
#initialize(argument_types, return_type) ⇒ Block
Returns a new instance of Block.
29 30 31 32 |
# File 'lib/types/block.rb', line 29 def initialize(argument_types, return_type) @argument_types = argument_types @return_type = return_type end |
Instance Attribute Details
#argument_types ⇒ Object (readonly)
Returns the value of attribute argument_types.
34 35 36 |
# File 'lib/types/block.rb', line 34 def argument_types @argument_types end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
35 36 37 |
# File 'lib/types/block.rb', line 35 def return_type @return_type end |
Instance Method Details
#to_s ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/types/block.rb', line 41 def to_s if @return_type "Block(#{@argument_types.join(', ')}, returns: #{@return_type})" else "Block(#{@argument_types.join(', ')})" end end |