Class: RouterService

Inherits:
Object
  • Object
show all
Includes:
Service
Defined in:
app/services/router_service.rb

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/services/router_service.rb', line 10

def call
  response = Remote.get(route)
  unless response.body.length == 0
    return Success.new(response: response)
  else
    return Error.new([
      {
        status: response.code,
        message: response.message
      }
    ])
  end
end