Class: Symbol

Inherits:
Object show all
Defined in:
lib/sxp/writer.rb,
lib/sxp/extensions.rb

Overview

Extensions for Ruby's Symbol class.

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) keyword?

Returns true if this is a keyword symbol.

Returns:

  • (Boolean)


8
9
10
# File 'lib/sxp/extensions.rb', line 8

def keyword?
  to_s[-1] == ?:
end

- (String) to_sxp

Returns the SXP representation of this object.

Returns:



68
69
70
# File 'lib/sxp/writer.rb', line 68

def to_sxp
  to_s
end