Class String
In: lib/nanite/util.rb
Parent: Object

Methods

Public Instance methods

Convert to snake case.

  "FooBar".snake_case           #=> "foo_bar"
  "HeadlineCNNNews".snake_case  #=> "headline_cnn_news"
  "CNN".snake_case              #=> "cnn"

@return [String] Receiver converted to snake case.

@api public

Convert a constant name to a path, assuming a conventional structure.

  "FooBar::Baz".to_const_path # => "foo_bar/baz"

@return [String] Path to the file containing the constant named by receiver

  (constantized string), assuming a conventional structure.

@api public

[Validate]