Class: Checker::Modules::Base
- Inherits:
-
Struct
- Object
- Struct
- Checker::Modules::Base
show all
- Defined in:
- lib/checker/modules/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#files ⇒ Object
Returns the value of attribute files
3
4
5
|
# File 'lib/checker/modules/base.rb', line 3
def files
@files
end
|
Instance Method Details
#check ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/checker/modules/base.rb', line 4
def check
check_files_existing or return true
check_executable or return true
check_all_files
valid?
end
|
#files_to_check ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/checker/modules/base.rb', line 16
def files_to_check
@files_to_check ||= begin
if self.class.extensions.any?
self.files.select { |f|
self.class.extensions.map { |ex| f.ends_with?(".#{ex}") }.any?
}
else
self.files
end
end
end
|
#valid? ⇒ Boolean
12
13
14
|
# File 'lib/checker/modules/base.rb', line 12
def valid?
@results.all_true?
end
|