Top Level Namespace
Defined Under Namespace
Modules: Railscheck
Constant Summary collapse
- CONFIG_FILE =
File.dirname(__FILE__) +'/tc_rails_deprecations.yml'
Instance Method Summary collapse
-
#get_file_as_string(filename) ⇒ Object
Read and return filename content as string.
-
#plural?(str) ⇒ Boolean
Helper: Checks if a string/symbol is pluralized.
-
#singular?(str) ⇒ Boolean
Helper: Checks if a string/symbol is singularized.
Instance Method Details
#get_file_as_string(filename) ⇒ Object
Read and return filename content as string.
4 5 6 7 8 |
# File 'lib/test/test_helper.rb', line 4 def get_file_as_string(filename) File.open(filename, "r") { |f| return f.read } end |
#plural?(str) ⇒ Boolean
Helper: Checks if a string/symbol is pluralized.
11 12 13 |
# File 'lib/test/test_helper.rb', line 11 def plural?(str) str.to_s.pluralize==str.to_s end |
#singular?(str) ⇒ Boolean
Helper: Checks if a string/symbol is singularized.
16 17 18 |
# File 'lib/test/test_helper.rb', line 16 def singular?(str) str.to_s.singularize==str.to_s end |