Class: Hotspots

Inherits:
Object
  • Object
show all
Defined in:
lib/hotspots.rb,
lib/hotspots/store.rb,
lib/hotspots/logger.rb,
lib/hotspots/version.rb,
lib/hotspots/options_parser.rb,
lib/hotspots/option_based_exit.rb,
lib/hotspots/repository/driver/git.rb,
lib/hotspots/repository/parser/git.rb,
lib/hotspots/repository/command/git.rb

Defined Under Namespace

Modules: OptionBasedExit, Repository Classes: Logger, OptionsParser, Store

Constant Summary collapse

VERSION =
"1.1.0"
Main =

Provides compatibility with older API These compatibility layers will be removed in the next major release (v2.0)

Hotspots

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Hotspots

Returns a new instance of Hotspots.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/hotspots.rb', line 13

def initialize(opts)
  options          = Hotspots::OptionsParser.default_options.merge(opts)

  @logger          = Hotspots::Logger.new
  @repository      = options[:repository]
  @verbose         = options[:verbose]
  @colour          = options[:colour]
  @exit_strategy   = options[:exit_strategy]

  @time            = options[:time]
  @message_filters = options[:message_filters]
  @file_filter     = options[:file_filter]
  @cutoff          = options[:cutoff]
end

Instance Attribute Details

#colourObject (readonly)

Returns the value of attribute colour.



9
10
11
# File 'lib/hotspots.rb', line 9

def colour
  @colour
end

#cutoffObject (readonly)

Returns the value of attribute cutoff.



9
10
11
# File 'lib/hotspots.rb', line 9

def cutoff
  @cutoff
end

#driverObject (readonly)

Returns the value of attribute driver.



9
10
11
# File 'lib/hotspots.rb', line 9

def driver
  @driver
end

#exit_strategyObject (readonly)

Returns the value of attribute exit_strategy.



9
10
11
# File 'lib/hotspots.rb', line 9

def exit_strategy
  @exit_strategy
end

#file_filterObject (readonly)

Returns the value of attribute file_filter.



9
10
11
# File 'lib/hotspots.rb', line 9

def file_filter
  @file_filter
end

#loggerObject (readonly)

Returns the value of attribute logger.



9
10
11
# File 'lib/hotspots.rb', line 9

def logger
  @logger
end

#message_filtersObject (readonly)

Returns the value of attribute message_filters.



9
10
11
# File 'lib/hotspots.rb', line 9

def message_filters
  @message_filters
end

#parserObject (readonly)

Returns the value of attribute parser.



9
10
11
# File 'lib/hotspots.rb', line 9

def parser
  @parser
end

#repositoryObject (readonly)

Returns the value of attribute repository.



9
10
11
# File 'lib/hotspots.rb', line 9

def repository
  @repository
end

#storeObject (readonly)

Returns the value of attribute store.



9
10
11
# File 'lib/hotspots.rb', line 9

def store
  @store
end

#timeObject (readonly)

Returns the value of attribute time.



9
10
11
# File 'lib/hotspots.rb', line 9

def time
  @time
end

#verboseObject (readonly)

Returns the value of attribute verbose.



9
10
11
# File 'lib/hotspots.rb', line 9

def verbose
  @verbose
end

Instance Method Details

#outputObject



28
29
30
31
32
# File 'lib/hotspots.rb', line 28

def output
  validate
  set
  run
end