aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/string_questioneer.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-06-03 22:38:27 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-06-03 22:38:27 -0700
commit53bcbfbdc1eed45cc6615e59d36baf018ab43d96 (patch)
tree691441d50ef7e49b5317ce279329bcaa1d135744 /activesupport/lib/active_support/string_questioneer.rb
parentf55ad960d22337d0d92a93724f1cc3ad45200836 (diff)
parent82e96eb294ae21528c3e05e91c05c7ee5222afbd (diff)
downloadrails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.tar.gz
rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.tar.bz2
rails-53bcbfbdc1eed45cc6615e59d36baf018ab43d96.zip
Merge branch 'master' into erbout
Diffstat (limited to 'activesupport/lib/active_support/string_questioneer.rb')
-rw-r--r--activesupport/lib/active_support/string_questioneer.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/string_questioneer.rb b/activesupport/lib/active_support/string_questioneer.rb
new file mode 100644
index 0000000000..7732f8b401
--- /dev/null
+++ b/activesupport/lib/active_support/string_questioneer.rb
@@ -0,0 +1,9 @@
+class StringQuestioneer < String
+ def method_missing(method_name, *arguments)
+ if method_name.to_s.ends_with?("?")
+ self == method_name.to_s[0..-2]
+ else
+ super
+ end
+ end
+end \ No newline at end of file