Class: DTK::DSL::ServiceAndComponentInfo::Info::InputFiles
- Inherits:
-
Object
- Object
- DTK::DSL::ServiceAndComponentInfo::Info::InputFiles
show all
- Defined in:
- lib/dsl/service_and_component_info/info/input_files.rb
Instance Method Summary
collapse
Constructor Details
#initialize(regexps) ⇒ InputFiles
Returns a new instance of InputFiles.
21
22
23
24
25
26
27
|
# File 'lib/dsl/service_and_component_info/info/input_files.rb', line 21
def initialize(regexps)
@regexps = regexps
@ndx_file_hash_content = {} end
|
Instance Method Details
#content_hash? ⇒ Boolean
45
46
47
48
|
# File 'lib/dsl/service_and_component_info/info/input_files.rb', line 45
def content_hash?
fail Error, "Unexpected that @ndx_file_hash_content.size > 1" if @ndx_file_hash_content.size > 1
@ndx_file_hash_content.values.first
end
|
#content_hash_array ⇒ Object
33
34
35
|
# File 'lib/dsl/service_and_component_info/info/input_files.rb', line 33
def content_hash_array
@ndx_file_hash_content.values
end
|
#empty? ⇒ Boolean
41
42
43
|
# File 'lib/dsl/service_and_component_info/info/input_files.rb', line 41
def empty?
@ndx_file_hash_content.empty?
end
|
37
38
39
|
# File 'lib/dsl/service_and_component_info/info/input_files.rb', line 37
def input_paths
@ndx_file_hash_content.keys
end
|
#match?(path) ⇒ Boolean
29
30
31
|
# File 'lib/dsl/service_and_component_info/info/input_files.rb', line 29
def match?(path)
@regexps.find { |regexp| path =~ regexp }
end
|