Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thorncp committed Dec 13, 2012
1 parent 7b74d05 commit 3f6b6d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fsck.gemspec
Expand Up @@ -13,9 +13,9 @@ Gem::Specification.new do |s|
s.description = s.summary

s.rubyforge_project = "fsck"

s.required_ruby_version = "~> 1.9.2"

s.add_development_dependency "rspec", "~> 2.3"

s.files = `git ls-files`.split("\n")
Expand Down
6 changes: 3 additions & 3 deletions lib/fsck.rb
@@ -1,11 +1,11 @@
module Fsck
def method_missing(sym, *args, &block)
fscked_method = sym.to_s

if punctuation = fscked_method[/[!?=]$/]
fscked_method.chop!
end

matches = methods.select do |m|
fscked_method =~ /^#{__fsck_method_regex_str__(m)}#{punctuation}$/
end
Expand All @@ -19,7 +19,7 @@ def method_missing(sym, *args, &block)
send(sym, *args, &block)
end
end

private
def __fsck_method_regex_str__(method)
words = method.to_s.delete("!?=").split("_").map { |w| Regexp.escape(w) }
Expand Down

0 comments on commit 3f6b6d4

Please sign in to comment.