class String
Archetype extensions for String
Public Instance Methods
camel_case()
click to toggle source
Converts a string to camel case
@return [String]
# File lib/core_ext/string.rb, line 28 def camel_case helper.camel_case(self) end
dash_case()
click to toggle source
Converts string to dash case
@return [String]
# File lib/core_ext/string.rb, line 19 def dash_case helper.dash_case(self) end
pluralize()
click to toggle source
Attempts to pluralize a word
@return [String]
# File lib/core_ext/string.rb, line 37 def pluralize helper.pluralize(self) end
randomize(size = 5)
click to toggle source
Adds a random string of specified length at the end
@return [String]
# File lib/core_ext/string.rb, line 55 def randomize(size = 5) helper.randomize(self, size.to_s) end
singularize()
click to toggle source
Attempts to singluarize a word
@return [String]
# File lib/core_ext/string.rb, line 46 def singularize helper.singularize(self) end
snake_case()
click to toggle source
Converts string to snake case
@return [String]
# File lib/core_ext/string.rb, line 10 def snake_case helper.snake_case(self) end
Private Instance Methods
helper()
click to toggle source
Instance helper methods
# File lib/core_ext/string.rb, line 62 def helper Object .new .extend(AppArchetype::Template::Helpers) end