Method: Symbol#to_prim

Defined in:
lib/cog/primitive.rb

#to_primString

Returns assuming this symbol represents a cog primitive type, returns an identifier of the mapped primitive in the Cog.active_language.

Examples:

# For Objective-C
:boolean.to_prim # => 'BOOL'

# For Java
:boolean.to_prim # => 'boolean'

# For C#
:boolean.to_prim # => 'bool'

Returns:

  • (String)

    assuming this symbol represents a cog primitive type, returns an identifier of the mapped primitive in the Cog.active_language



12
13
14
# File 'lib/cog/primitive.rb', line 12

def to_prim
  Cog.active_language.to_prim(self)
end