Class: Method

Inherits:
Object show all
Defined in:
lib/rtype/core_ext.rb

Instance Method Summary collapse

Instance Method Details

#argument_typeArray, Hash

Returns:



129
130
131
# File 'lib/rtype/core_ext.rb', line 129

def argument_type
  ::Rtype.type_signatures[owner][name].argument_type
end

#return_typeObject

Returns A type behavior.

Returns:

  • A type behavior



134
135
136
# File 'lib/rtype/core_ext.rb', line 134

def return_type
  ::Rtype.type_signatures[owner][name].return_type
end

#type_infoHash

Returns:

  • (Hash)

See Also:

  • TypeSignature#info


124
125
126
# File 'lib/rtype/core_ext.rb', line 124

def type_info
  ::Rtype.type_signatures[owner][name].info
end

#type_signatureTypeSignature

Returns:

  • (TypeSignature)


118
119
120
# File 'lib/rtype/core_ext.rb', line 118

def type_signature
  ::Rtype.type_signatures[owner][name]
end

#typed?Boolean

Returns Whether the method is typed with rtype.

Returns:

  • (Boolean)

    Whether the method is typed with rtype



113
114
115
# File 'lib/rtype/core_ext.rb', line 113

def typed?
  !!::Rtype.type_signatures[owner][name]
end