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.



8
9
10
# File 'lib/soaspec/test_server/puppy_service.rb', line 8

def data
  @data
end

Class Method Details

.new_idObject



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

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