Class: Symbol

Inherits:
Object show all
Defined in:
vendor/bundler/ruby/3.1.0/bundler/gems/sxp.rb-7133e42f43bb/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)


97
98
99
# File 'vendor/bundler/ruby/3.1.0/bundler/gems/sxp.rb-7133e42f43bb/lib/sxp/extensions.rb', line 97

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

#to_sxp(**options) ⇒ String

Returns the SXP representation of this object.

Returns:



89
90
91
# File 'vendor/bundler/ruby/3.1.0/bundler/gems/sxp.rb-7133e42f43bb/lib/sxp/extensions.rb', line 89

def to_sxp(**options)
  to_s
end