Class: LevelTravel::Request::Response

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/level_travel/request.rb

Instance Method Summary collapse

Instance Method Details

#failure?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/level_travel/request.rb', line 19

def failure?
  !success?
end

#success?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/level_travel/request.rb', line 15

def success?
  code == 200
end