Class: ResourceIn::Resource
- Inherits:
-
Object
- Object
- ResourceIn::Resource
- Defined in:
- lib/resource_in/resource.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#drivers ⇒ Object
readonly
Returns the value of attribute drivers.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #do_create(options) ⇒ Object
- #filter(data, condition) ⇒ Object
-
#initialize ⇒ Resource
constructor
A new instance of Resource.
-
#list ⇒ Object
These methods are assumed to be override by each Resource SubClass.
- #output(data) ⇒ Object
Constructor Details
#initialize ⇒ Resource
Returns a new instance of Resource.
5 6 7 |
# File 'lib/resource_in/resource.rb', line 5 def initialize @drivers = [] end |
Instance Attribute Details
#drivers ⇒ Object (readonly)
Returns the value of attribute drivers.
3 4 5 |
# File 'lib/resource_in/resource.rb', line 3 def drivers @drivers end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/resource_in/resource.rb', line 3 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/resource_in/resource.rb', line 3 def type @type end |
Instance Method Details
#do_create(options) ⇒ Object
28 29 30 |
# File 'lib/resource_in/resource.rb', line 28 def do_create() # This create resoruce end |
#filter(data, condition) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/resource_in/resource.rb', line 15 def filter(data, condition) # This implement filters of input data # @input: # - data : Array # - condition : String # @output : Array end |
#list ⇒ Object
These methods are assumed to be override by each Resource SubClass
10 11 12 13 |
# File 'lib/resource_in/resource.rb', line 10 def list # This methods list data from each drivers # @output: Array end |
#output(data) ⇒ Object
23 24 25 26 |
# File 'lib/resource_in/resource.rb', line 23 def output(data) # This outputs data to STDOUT # @input : Array end |