Class: PmdTester::Project::CpdOptions
- Inherits:
-
Object
- Object
- PmdTester::Project::CpdOptions
- Defined in:
- lib/pmdtester/project.rb
Overview
Containts Cpd specific options from project-list.xml
Instance Attribute Summary collapse
-
#directories ⇒ Object
readonly
Returns the value of attribute directories.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#max_memory ⇒ Object
readonly
Returns the value of attribute max_memory.
-
#minimum_tokens ⇒ Object
readonly
Returns the value of attribute minimum_tokens.
Instance Method Summary collapse
-
#initialize(cpd_options_element) ⇒ CpdOptions
constructor
A new instance of CpdOptions.
Constructor Details
#initialize(cpd_options_element) ⇒ CpdOptions
Returns a new instance of CpdOptions.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/pmdtester/project.rb', line 165 def initialize() # default values @language = 'java' @minimum_tokens = 150 @max_memory = '5g' @directories = ['.'] return if .nil? @language = parse_text(, 'language', @language) @minimum_tokens = parse_text(, 'minimum-tokens', @minimum_tokens).to_i @max_memory = parse_text(, 'max-memory', @max_memory) @directories = parse_directories(, @directories) end |
Instance Attribute Details
#directories ⇒ Object (readonly)
Returns the value of attribute directories.
163 164 165 |
# File 'lib/pmdtester/project.rb', line 163 def directories @directories end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
160 161 162 |
# File 'lib/pmdtester/project.rb', line 160 def language @language end |
#max_memory ⇒ Object (readonly)
Returns the value of attribute max_memory.
162 163 164 |
# File 'lib/pmdtester/project.rb', line 162 def max_memory @max_memory end |
#minimum_tokens ⇒ Object (readonly)
Returns the value of attribute minimum_tokens.
161 162 163 |
# File 'lib/pmdtester/project.rb', line 161 def minimum_tokens @minimum_tokens end |