Class: ResourceIn::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/resource_in/resource.rb

Direct Known Subclasses

Machine

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResource

Returns a new instance of Resource.



5
6
7
# File 'lib/resource_in/resource.rb', line 5

def initialize
  @drivers = []
end

Instance Attribute Details

#driversObject (readonly)

Returns the value of attribute drivers.



3
4
5
# File 'lib/resource_in/resource.rb', line 3

def drivers
  @drivers
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/resource_in/resource.rb', line 3

def name
  @name
end

#typeObject (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(options)
  # 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

#listObject

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