Sha256: caba0fd7693db3adc1a5f2ff1887c948eff6bffb130a0da159544cde09b142d4

Contents?: true

Size: 784 Bytes

Versions: 1

Compression:

Stored size: 784 Bytes

Contents

# frozen_string_literal: true

module Tataru
  # base class of resource
  class BaseResource
    attr_reader :remote_id

    def initialize(remote_id)
      @remote_id = remote_id
    end

    def create(_name_value_hash)
      # create the resource
    end

    def read(_name_array)
      # read a range of resource fields
      {}
    end

    def update(name_value_hash)
      # update the resource fields
    end

    def delete
      # delete the resource
    end

    def outputs
      # resource outputs
      {}
    end

    def create_complete?
      # check if creation is complete
      true
    end

    def update_complete?
      # check if update is complete
      true
    end

    def delete_complete?
      # check if delete is complete
      true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tataru-0.2.0 lib/tataru/base_resource.rb