Class: ConvertRooms

Inherits:
Object
  • Object
show all
Includes:
Interpipe::Interactor
Defined in:
app/interactors/convert_rooms.rb

Instance Method Summary collapse

Methods included from Interpipe::Interactor

included, #initialize, #setup

Instance Method Details

#perform(kosapi_rooms:, **options) ⇒ Object


6
7
8
9
10
11
# File 'app/interactors/convert_rooms.rb', line 6

def perform(kosapi_rooms:, **options)
  @rooms = kosapi_rooms.map do |room|
    convert_room(room)
  end
  @options = options
end

#resultsObject


13
14
15
# File 'app/interactors/convert_rooms.rb', line 13

def results
  { rooms: @rooms }.merge(@options)
end