Class: Cure::Dsl::SourceFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/cure/dsl/source_files.rb

Defined Under Namespace

Classes: SourceFile

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSourceFiles

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

#candidatesObject (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

Returns:

  • (Boolean)


21
22
23
# File 'lib/cure/dsl/source_files.rb', line 21

def has_candidates?
  @candidates.length.positive?
end