Sha256: f67efc4d771f8ab4eb7835d4e4547f5e9bb253ed32994d25dbf8f45573f70d11

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

require_relative '../string'

class Symbol
  # This method applies +String#default!+ method to the receiver converted to
  # a string. Of course, symbols are immutable, so in spite of the exclamation
  # mark in the method name, a new symbol (supplied as argument) is returned,
  # if the original one is considered "defaulted" (otherwise, original symbol
  # is returned unchanged).
  # 
  def default! default_symbol
    to_s.default!( default_symbol ).to_sym
  end
  
  # Applies +String#to_standardized_sym+ method to the recevier converted to a
  # string.
  # 
  def to_standardized_sym
    to_s.to_standardized_sym
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
y_support-2.5.3 lib/y_support/core_ext/symbol/misc.rb
y_support-2.5.2 lib/y_support/core_ext/symbol/misc.rb
y_support-2.5.1 lib/y_support/core_ext/symbol/misc.rb
y_support-2.4.6 lib/y_support/core_ext/symbol/misc.rb