Class: Soaspec::TestServer::PuppyService

Inherits:
Object
  • Object
show all
Defined in:
lib/soaspec/test_server/puppy_service.rb

Overview

Simulates ordering a new puppy. Used for testing REST storing, retrieving and updating data

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.dataObject

Returns the value of attribute data.



10
11
12
# File 'lib/soaspec/test_server/puppy_service.rb', line 10

def data
  @data
end

Class Method Details

.new_idObject



12
13
14
15
16
17
# File 'lib/soaspec/test_server/puppy_service.rb', line 12

def new_id
  @data[@current_id] = {}
  @data[@current_id][:Id] = @current_id
  @current_id += 1
  @current_id - 1
end