Class: Symbol

Inherits:
Object show all
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/sxp.rb-ff0ae90d6303/lib/sxp/writer.rb,
vendor/bundler/ruby/2.5.0/bundler/gems/sxp.rb-ff0ae90d6303/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 'vendor/bundler/ruby/2.5.0/bundler/gems/sxp.rb-ff0ae90d6303/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 'vendor/bundler/ruby/2.5.0/bundler/gems/sxp.rb-ff0ae90d6303/lib/sxp/writer.rb', line 72

def to_sxp
  to_s
end