Permalink
Browse files

Renamed StringQuestioneer to StringInquirer.

  • Loading branch information...
1 parent 6e85f14 commit 5fe28789731fd521d5a250ac7be21da45dae147d @josh josh committed Jun 4, 2008
View
@@ -4,7 +4,7 @@
* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [Josh Peek]
-* Added StringQuestioneer for doing things like StringQuestioneer.new("production").production? # => true and StringQuestioneer.new("production").development? # => false [DHH]
+* Added StringInquirer for doing things like StringInquirer.new("production").production? # => true and StringInquirer.new("production").development? # => false [DHH]
* Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] (Danger)
@@ -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'
@@ -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]
@@ -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
@@ -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
@@ -1,6 +1,6 @@
*Edge*
-* Wrapped Rails.env in StringQuestioneer so you can do Rails.env.development? [DHH]
+* Wrapped Rails.env in StringInquirer so you can do Rails.env.development? [DHH]
* Fixed that RailsInfoController wasn't considering all requests local in development mode (Edgard Castro) [#310 state:resolved]
@@ -37,7 +37,7 @@ def root
end
def env
- ActiveSupport::StringQuestioneer.new(RAILS_ENV)
+ ActiveSupport::StringInquirer.new(RAILS_ENV)
end
def cache

2 comments on commit 5fe2878

Contributor

benpickles commented on 5fe2878 Jun 5, 2008

thankyou, the whole Questioneer thing was freaking me out!

Contributor

ncr replied Jun 5, 2008

Just like Overseer from Fallout ;)

Please sign in to comment.