Class: Cure::Dsl::SourceFiles
- Inherits:
-
Object
- Object
- Cure::Dsl::SourceFiles
- Defined in:
- lib/cure/dsl/source_files.rb
Defined Under Namespace
Classes: SourceFile
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
Instance Method Summary collapse
- #csv(type, value, ref_name: nil) ⇒ Object
- #has_candidates? ⇒ Boolean
-
#initialize ⇒ SourceFiles
constructor
A new instance of SourceFiles.
Constructor Details
#initialize ⇒ SourceFiles
Returns a new instance of SourceFiles.
12 13 14 |
# File 'lib/cure/dsl/source_files.rb', line 12 def initialize @candidates = [] end |
Instance Attribute Details
#candidates ⇒ Object (readonly)
Returns the value of attribute candidates.
10 11 12 |
# File 'lib/cure/dsl/source_files.rb', line 10 def candidates @candidates end |
Instance Method Details
#csv(type, value, ref_name: nil) ⇒ Object
16 17 18 19 |
# File 'lib/cure/dsl/source_files.rb', line 16 def csv(type, value, ref_name: nil) candidate = SourceFile.new(type, value, ref_name) @candidates << candidate end |
#has_candidates? ⇒ Boolean
21 22 23 |
# File 'lib/cure/dsl/source_files.rb', line 21 def has_candidates? @candidates.length.positive? end |