Sha256: dfbedf846ad5c68d0132a969631c550e5af068669bc66d98a9d85545d26b3312

Contents?: true

Size: 602 Bytes

Versions: 2

Compression:

Stored size: 602 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

Version Path
y_support-2.1.13 lib/y_support/core_ext/symbol/misc.rb
y_support-2.1.12 lib/y_support/core_ext/symbol/misc.rb