Class: Codelocks::Lock

Inherits:
Object
  • Object
show all
Defined in:
lib/codelocks/lock.rb

Class Method Summary collapse

Class Method Details

.allCodelocks::NetCode::Response

Fetch a list of locks. Requires the access key env var to be set

Returns:

  • (Codelocks::NetCode::Response)

8
9
10
11
12
13
14
15
16
# File 'lib/codelocks/lock.rb', line 8

def all
  if !Codelocks.access_key
    raise CodelocksError.new("An access key must be provided")
  end

  Request.create("lock",
    "accesskey": Codelocks.access_key
  )
end