Class: AbideDevUtils::Ppt::ScoreModule
- Inherits:
-
Object
- Object
- AbideDevUtils::Ppt::ScoreModule
- Defined in:
- lib/abide_dev_utils/ppt/score_module.rb
Instance Attribute Summary collapse
-
#manifests_dir ⇒ Object
readonly
Returns the value of attribute manifests_dir.
-
#module_dir ⇒ Object
readonly
Returns the value of attribute module_dir.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
Instance Method Summary collapse
-
#initialize(module_dir) ⇒ ScoreModule
constructor
A new instance of ScoreModule.
- #lint ⇒ Object
Constructor Details
#initialize(module_dir) ⇒ ScoreModule
Returns a new instance of ScoreModule.
13 14 15 16 17 18 |
# File 'lib/abide_dev_utils/ppt/score_module.rb', line 13 def initialize(module_dir) @module_name = module_dir.split(File::SEPARATOR)[-1] @module_dir = real_module_dir(module_dir) @manifests_dir = File.join(real_module_dir(module_dir), 'manifests') @metadata = JSON.parse(File.join(@module_dir, 'metadata.json')) end |
Instance Attribute Details
#manifests_dir ⇒ Object (readonly)
Returns the value of attribute manifests_dir.
11 12 13 |
# File 'lib/abide_dev_utils/ppt/score_module.rb', line 11 def manifests_dir @manifests_dir end |
#module_dir ⇒ Object (readonly)
Returns the value of attribute module_dir.
11 12 13 |
# File 'lib/abide_dev_utils/ppt/score_module.rb', line 11 def module_dir @module_dir end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
11 12 13 |
# File 'lib/abide_dev_utils/ppt/score_module.rb', line 11 def module_name @module_name end |
Instance Method Details
#lint ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/abide_dev_utils/ppt/score_module.rb', line 20 def lint linter_exit_code, linter_output = lint_manifests { exit_code: linter_exit_code, manifests: manifest_count, lines: line_count, linter_version: linter_version, output: linter_output }.to_json end |