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

#keyword?Boolean

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

#to_sxpString

Returns the SXP representation of this object.

Returns:


72
73
74
# File 'lib/sxp/writer.rb', line 72

def to_sxp
  to_s
end