Class: Reviewer::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/reviewer/loader.rb

Overview

Provides a collection of the configured tools

Defined Under Namespace

Classes: InvalidConfigurationError, MissingConfigurationError, MissingReviewCommandError

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file = Reviewer.configuration.file) ⇒ Loader

Returns a new instance of Loader.



16
17
18
19
20
21
# File 'lib/reviewer/loader.rb', line 16

def initialize(file = Reviewer.configuration.file)
  @file = file
  @configuration = configuration_hash

  validate_configuration!
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



14
15
16
# File 'lib/reviewer/loader.rb', line 14

def configuration
  @configuration
end

#fileObject (readonly)

Returns the value of attribute file.



14
15
16
# File 'lib/reviewer/loader.rb', line 14

def file
  @file
end

Class Method Details

.configurationObject



27
28
29
# File 'lib/reviewer/loader.rb', line 27

def self.configuration
  new.configuration
end

Instance Method Details

#to_hObject



23
24
25
# File 'lib/reviewer/loader.rb', line 23

def to_h
  configuration
end