Class: Tataru::BaseResource

Inherits:
Object
  • Object
show all
Defined in:
lib/tataru/base_resource.rb

Overview

base class of resource

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(remote_id) ⇒ BaseResource

Returns a new instance of BaseResource.



8
9
10
# File 'lib/tataru/base_resource.rb', line 8

def initialize(remote_id)
  @remote_id = remote_id
end

Instance Attribute Details

#remote_idObject (readonly)

Returns the value of attribute remote_id.



6
7
8
# File 'lib/tataru/base_resource.rb', line 6

def remote_id
  @remote_id
end

Instance Method Details

#create(_name_value_hash) ⇒ Object



12
13
14
# File 'lib/tataru/base_resource.rb', line 12

def create(_name_value_hash)
  # create the resource
end

#create_complete?Boolean

Returns:

  • (Boolean)


34
35
36
37
# File 'lib/tataru/base_resource.rb', line 34

def create_complete?
  # check if creation is complete
  true
end

#deleteObject



25
26
27
# File 'lib/tataru/base_resource.rb', line 25

def delete
  # delete the resource
end

#delete_complete?Boolean

Returns:

  • (Boolean)


44
45
46
47
# File 'lib/tataru/base_resource.rb', line 44

def delete_complete?
  # check if delete is complete
  true
end

#outputsObject



29
30
31
32
# File 'lib/tataru/base_resource.rb', line 29

def outputs
  # resource outputs
  {}
end

#read(_name_array) ⇒ Object



16
17
18
19
# File 'lib/tataru/base_resource.rb', line 16

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

#update(name_value_hash) ⇒ Object



21
22
23
# File 'lib/tataru/base_resource.rb', line 21

def update(name_value_hash)
  # update the resource fields
end

#update_complete?Boolean

Returns:

  • (Boolean)


39
40
41
42
# File 'lib/tataru/base_resource.rb', line 39

def update_complete?
  # check if update is complete
  true
end