class Symbol
Public Instance Methods
default_lit()
click to toggle source
@return [String] assuming this symbol represents a cog primitive type, returns the literal representation of the default value for that type @example
# For Objective-C :string.default_lit # => '@""'
# File lib/cog/primitive.rb, line 20 def default_lit Cog.active_language.default_lit_for(self) end
to_prim()
click to toggle source
@return [String] assuming this symbol represents a cog primitive type, returns an identifier of the mapped primitive in the {Cog::Config::LanguageConfig#active_language Cog.active_language} @example
# For Objective-C :boolean.to_prim # => 'BOOL' # For Java :boolean.to_prim # => 'boolean' # For C# :boolean.to_prim # => 'bool'
# File lib/cog/primitive.rb, line 12 def to_prim Cog.active_language.to_prim(self) end