Class: RubyBreaker::TypeDefs::MethodType

Inherits:
BlockType show all
Defined in:
lib/rubybreaker/type/type.rb

Overview

This class represents a method and is essentially same as block type except the method name.

Instance Attribute Summary collapse

Attributes inherited from BlockType

#arg_types, #blk_type, #ret_type

Attributes inherited from Type

#ctx

Instance Method Summary collapse

Methods inherited from Type

#eql?, #subtype_of?, #unparse

Constructor Details

#initialize(meth_name, arg_types = [], blk_type = nil, ret_type = nil, *args) ⇒ MethodType

Returns a new instance of MethodType.



180
181
182
183
# File 'lib/rubybreaker/type/type.rb', line 180

def initialize(meth_name,arg_types=[],blk_type=nil,ret_type=nil,*args)
  super(arg_types,blk_type,ret_type,*args)
  @meth_name = meth_name.to_sym
end

Instance Attribute Details

#meth_nameObject

This accessor sets/gets the method name for this method type.



178
179
180
# File 'lib/rubybreaker/type/type.rb', line 178

def meth_name
  @meth_name
end