Class: EhbrsRubyUtils::Booking::Processors::List::BuildAccommodation

Inherits:
Object
  • Object
show all
Defined in:
lib/ehbrs_ruby_utils/booking/processors/list/build_accommodation.rb

Constant Summary collapse

TOTAL_VALUE =
'=index($A:$ZZZ;row();column()-2)+index($A:$ZZZ;row();column()-1)'

Instance Method Summary collapse

Instance Method Details

Returns:

  • (String)


22
23
24
# File 'lib/ehbrs_ruby_utils/booking/processors/list/build_accommodation.rb', line 22

def link_value
  "=HYPERLINK(\"#{data.fetch(:href)}\";\"#{data.fetch(:name)}\")"
end

#resultObject



15
16
17
18
19
# File 'lib/ehbrs_ruby_utils/booking/processors/list/build_accommodation.rb', line 15

def result
  %i[link total].inject(data) do |a, e|
    a.merge(e => send("#{e}_value"))
  end
end

#total_valueString

Returns:

  • (String)


27
28
29
# File 'lib/ehbrs_ruby_utils/booking/processors/list/build_accommodation.rb', line 27

def total_value
  TOTAL_VALUE
end