Class: Tataru::BaseResource
- Inherits:
-
Object
- Object
- Tataru::BaseResource
- Defined in:
- lib/tataru/base_resource.rb
Overview
base class of resource
Instance Attribute Summary collapse
-
#remote_id ⇒ Object
readonly
Returns the value of attribute remote_id.
Instance Method Summary collapse
- #create(_name_value_hash) ⇒ Object
- #create_complete? ⇒ Boolean
- #delete ⇒ Object
- #delete_complete? ⇒ Boolean
-
#initialize(remote_id) ⇒ BaseResource
constructor
A new instance of BaseResource.
- #outputs ⇒ Object
- #read(_name_array) ⇒ Object
- #update(name_value_hash) ⇒ Object
- #update_complete? ⇒ Boolean
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_id ⇒ Object (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
34 35 36 37 |
# File 'lib/tataru/base_resource.rb', line 34 def create_complete? # check if creation is complete true end |
#delete ⇒ Object
25 26 27 |
# File 'lib/tataru/base_resource.rb', line 25 def delete # delete the resource end |
#delete_complete? ⇒ Boolean
44 45 46 47 |
# File 'lib/tataru/base_resource.rb', line 44 def delete_complete? # check if delete is complete true end |
#outputs ⇒ Object
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
39 40 41 42 |
# File 'lib/tataru/base_resource.rb', line 39 def update_complete? # check if update is complete true end |