Skip to content

Commit

Permalink
make sub classing flay work
Browse files Browse the repository at this point in the history
  • Loading branch information
tamgrosser committed Nov 19, 2016
1 parent 4dc39b0 commit afdb5f4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/flay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class Location < Struct.new(:file, :line, :fuzzy)
end

def self.run args = ARGV
extensions = ["rb"] + Flay.load_plugins
extensions = ["rb"] + load_plugins
glob = "**/*.{#{extensions.join ","}}"

expander = PathExpander.new args, glob
files = expander.filter_files expander.process, DEFAULT_IGNORE

flay = Flay.new Flay.parse_options args
flay = new parse_options args
flay.process(*files)
flay
end
Expand Down Expand Up @@ -63,7 +63,7 @@ def self.parse_options args = ARGV

OptionParser.new do |opts|
opts.banner = "flay [options] files_or_dirs"
opts.version = Flay::VERSION
opts.version = ERSION

opts.separator ""
opts.separator "Specific options:"
Expand Down Expand Up @@ -113,7 +113,7 @@ def self.parse_options args = ARGV
options[:timeout] = t.to_i
end

extensions = ["rb"] + Flay.load_plugins
extensions = ["rb"] + load_plugins

opts.separator ""
opts.separator "Known extensions: #{extensions.join(", ")}"
Expand Down Expand Up @@ -170,7 +170,7 @@ def self.load_plugins
# Create a new instance of Flay with +option+s.

def initialize option = nil
@option = option || Flay.default_options
@option = option || self.class.default_options
@hashes = Hash.new { |h,k| h[k] = [] }

self.identical = {}
Expand Down

0 comments on commit afdb5f4

Please sign in to comment.