Class: Exfuz::Candidate

Inherits:
Object
  • Object
show all
Defined in:
lib/exfuz/candidate.rb

Instance Method Summary collapse

Constructor Details

#initialize(book_name:, sheet_name:, textable:) ⇒ Candidate

Returns a new instance of Candidate.



7
8
9
10
11
# File 'lib/exfuz/candidate.rb', line 7

def initialize(book_name:, sheet_name:, textable:)
  @book_name = book_name
  @sheet_name = sheet_name
  @textable = textable
end

Instance Method Details

#to_lineObject



17
18
19
20
21
22
23
24
25
# File 'lib/exfuz/candidate.rb', line 17

def to_line
  @conf ||= Exfuz::Configuration.instance
  [
    book_name_line,
    @sheet_name,
    textable_position_line,
    value_line
  ].join(@conf.line_sep)
end

#valueObject



13
14
15
# File 'lib/exfuz/candidate.rb', line 13

def value
  @textable.value
end