Module: Airspace

Defined in:
lib/airspace/key.rb,
lib/airspace/store.rb,
lib/airspace/reader.rb,
lib/airspace/chunker.rb,
lib/airspace/dataset.rb,
lib/airspace/version.rb,
lib/airspace/airspace.rb,
lib/airspace/metadata.rb,
lib/airspace/info_keys.rb,
lib/airspace/serializer.rb,
lib/airspace/has_metadata.rb

Overview

Copyright © 2019-present, Blue Marble Payroll, LLC

This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

Defined Under Namespace

Modules: HasMetadata, InfoKeys Classes: Chunker, Dataset, Key, Metadata, Reader, Serializer, Store

Constant Summary collapse

VERSION =
'1.0.1'

Class Method Summary collapse

Class Method Details

.del(client, id, options: {}) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/airspace/airspace.rb', line 42

def del(client, id, options: {})
  reader = get(client, id, options: options)

  return false unless reader

  reader.delete
end

.get(client, id, options: {}) ⇒ Object



38
39
40
# File 'lib/airspace/airspace.rb', line 38

def get(client, id, options: {})
  ::Airspace::Reader.find_by_id(client, id, options: options)
end

.set(client, id: nil, data: {}, pages: [], options: {}) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/airspace/airspace.rb', line 28

def set(client, id: nil, data: {}, pages: [], options: {})
  ::Airspace::Dataset.new(
    client,
    id: id,
    data: data,
    pages: pages,
    options: options
  ).save.id
end