Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renamed StringQuestioneer to StringInquirer.

Signed-off-by: Tarmo Tänav <tarmo@itech.ee>
  • Loading branch information...
commit 9e65cbd3f435849ab2bcd1fc0eebdd142db149a1 1 parent 5b6fb7c
@josh josh authored tarmo committed
View
2  activesupport/lib/active_support.rb
@@ -43,7 +43,7 @@
require 'active_support/ordered_options'
require 'active_support/option_merger'
-require 'active_support/string_questioneer'
+require 'active_support/string_inquirer'
require 'active_support/values/time_zone'
require 'active_support/duration'
View
2  ...esupport/lib/active_support/string_questioneer.rb → activesupport/lib/active_support/string_inquirer.rb
@@ -1,5 +1,5 @@
module ActiveSupport
- class StringQuestioneer < String
+ class StringInquirer < String
def method_missing(method_name, *arguments)
if method_name.to_s.ends_with?("?")
self == method_name.to_s[0..-2]
View
15 activesupport/test/string_inquirer_test.rb
@@ -0,0 +1,15 @@
+require 'abstract_unit'
+
+class StringInquirerTest < Test::Unit::TestCase
+ def test_match
+ assert ActiveSupport::StringInquirer.new("production").production?
+ end
+
+ def test_miss
+ assert !ActiveSupport::StringInquirer.new("production").development?
+ end
+
+ def test_missing_question_mark
+ assert_raises(NoMethodError) { ActiveSupport::StringInquirer.new("production").production }
+ end
+end
View
15 activesupport/test/string_questioneer_test.rb
@@ -1,15 +0,0 @@
-require 'abstract_unit'
-
-class StringQuestioneerTest < Test::Unit::TestCase
- def test_match
- assert ActiveSupport::StringQuestioneer.new("production").production?
- end
-
- def test_miss
- assert !ActiveSupport::StringQuestioneer.new("production").development?
- end
-
- def test_missing_question_mark
- assert_raises(NoMethodError) { ActiveSupport::StringQuestioneer.new("production").production }
- end
-end
View
2  railties/lib/initializer.rb
@@ -36,7 +36,7 @@ def root
end
def env
- ActiveSupport::StringQuestioneer.new(RAILS_ENV)
+ ActiveSupport::StringInquirer.new(RAILS_ENV)
end
def cache
Please sign in to comment.
Something went wrong with that request. Please try again.