RbSymbol

Swift
public struct RbSymbol: RbObjectConvertible, Hashable

extension RbSymbol: CustomStringConvertible

Represent a Ruby symbol.

Ruby symbols are written :name. If in Ruby you would write:

obj.meth(:value)

Then the RubyGateway version is:

try obj.call("meth", args: [RbSymbol("value")])

Topics

init(String)

Create from the name for the symbol. No leading colon.

Declaration
Swift
public init(_ name: String)

var rubyObject: RbObject

A Ruby object for the symbol

Declaration
Swift
public var rubyObject: RbObject { get }

CustomStringConvertible

var description: String

A textual representation of the RbSymbol

Declaration
Swift
public var description: String { get }