Class: Obcd::Checks::Check
- Inherits:
-
Object
- Object
- Obcd::Checks::Check
- Defined in:
- lib/obcd/checks/check.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#violations ⇒ Object
Returns the value of attribute violations.
Class Method Summary collapse
Instance Method Summary collapse
- #check! ⇒ Object
-
#initialize(filename) ⇒ Check
constructor
A new instance of Check.
Constructor Details
#initialize(filename) ⇒ Check
Returns a new instance of Check.
6 7 8 9 |
# File 'lib/obcd/checks/check.rb', line 6 def initialize(filename) @filename = filename @violations = [] end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
4 5 6 |
# File 'lib/obcd/checks/check.rb', line 4 def filename @filename end |
#violations ⇒ Object
Returns the value of attribute violations.
4 5 6 |
# File 'lib/obcd/checks/check.rb', line 4 def violations @violations end |
Class Method Details
.check(filename) ⇒ Object
15 16 17 18 19 |
# File 'lib/obcd/checks/check.rb', line 15 def self.check(filename) instance = new(filename) instance.check! instance.violations end |
Instance Method Details
#check! ⇒ Object
11 12 13 |
# File 'lib/obcd/checks/check.rb', line 11 def check! # implement in a child class end |