Class: RubyCritic::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

Returns the value of attribute deduplicate_symlinks


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def deduplicate_symlinks
  @deduplicate_symlinks
end

#formatObject

Returns the value of attribute format


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def format
  @format
end

#modeObject

Returns the value of attribute mode


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def mode
  @mode
end

#no_browserObject

Returns the value of attribute no_browser


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def no_browser
  @no_browser
end

#open_withObject

Returns the value of attribute open_with


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def open_with
  @open_with
end

#rootObject

Returns the value of attribute root


6
7
8
# File 'lib/rubycritic/configuration.rb', line 6

def root
  @root
end

#source_control_systemObject

Returns the value of attribute source_control_system


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def source_control_system
  @source_control_system
end

#suppress_ratingsObject

Returns the value of attribute suppress_ratings


7
8
9
# File 'lib/rubycritic/configuration.rb', line 7

def suppress_ratings
  @suppress_ratings
end

Instance Method Details

#set(options) ⇒ Object


10
11
12
13
14
15
16
17
18
# File 'lib/rubycritic/configuration.rb', line 10

def set(options)
  self.mode = options[:mode] || :default
  self.root = options[:root] || 'tmp/rubycritic'
  self.format = options[:format] || :html
  self.deduplicate_symlinks = options[:deduplicate_symlinks] || false
  self.suppress_ratings = options[:suppress_ratings] || false
  self.open_with = options[:open_with]
  self.no_browser = options[:no_browser]
end

#source_control_present?Boolean


24
25
26
27
# File 'lib/rubycritic/configuration.rb', line 24

def source_control_present?
  source_control_system &&
    !source_control_system.is_a?(SourceControlSystem::Double)
end