Class: Cure::Dsl::Builder
- Inherits:
-
Object
- Object
- Cure::Dsl::Builder
- Defined in:
- lib/cure/dsl/builder.rb
Instance Attribute Summary collapse
-
#candidates ⇒ Object
readonly
Returns the value of attribute candidates.
Instance Method Summary collapse
- #candidate(column: nil, named_range: "_default", &block) ⇒ Object
-
#initialize ⇒ Builder
constructor
A new instance of Builder.
Constructor Details
#initialize ⇒ Builder
Returns a new instance of Builder.
12 13 14 |
# File 'lib/cure/dsl/builder.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/builder.rb', line 10 def candidates @candidates end |
Instance Method Details
#candidate(column: nil, named_range: "_default", &block) ⇒ Object
19 20 21 22 23 |
# File 'lib/cure/dsl/builder.rb', line 19 def candidate(column: nil, named_range: "_default", &block) candidate = Cure::Builder::Candidate.new(column, named_range) @candidates << candidate candidate.instance_exec(&block) end |