module PositiveSymbolSupport::SymbolExt

Symbol に機能を追加するためのモジュール @see api.rubyonrails.org/classes/ActiveSupport/Inflector.html

Public Instance Methods

constantize() click to toggle source
# File lib/positive_symbol_support/symbol_ext.rb, line 16
def constantize
  self
end
foreign_key( separate_class_name_and_id_with_underscore = true ) click to toggle source
# File lib/positive_symbol_support/symbol_ext.rb, line 33
def foreign_key( separate_class_name_and_id_with_underscore = true )
  to_s.send( __method__ , separate_class_name_and_id_with_underscore ).to_sym
end
humanize( options = {} ) click to toggle source
# File lib/positive_symbol_support/symbol_ext.rb, line 37
def humanize( options = {} )
  to_s.send( __method__ , options ).to_sym
end
parameterize( sep = "-" ) click to toggle source
# File lib/positive_symbol_support/symbol_ext.rb, line 41
def parameterize( sep = "-" )
  to_s.send( __method__ , sep ).to_sym
end