Class: Tataru::ResourceTypePool

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

Overview

class resource type pool

Instance Method Summary collapse

Constructor Details

#initializeResourceTypePool

Returns a new instance of ResourceTypePool.



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

def initialize
  @pool = {}
end

Instance Method Details

#add_resource_desc(symbol, classconstant) ⇒ Object



10
11
12
# File 'lib/tataru/resource_type_pool.rb', line 10

def add_resource_desc(symbol, classconstant)
  @pool[symbol] = classconstant
end

#resource_desc_exist?(symbol) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/tataru/resource_type_pool.rb', line 18

def resource_desc_exist?(symbol)
  @pool.key? symbol
end

#resource_desc_for(symbol) ⇒ Object



14
15
16
# File 'lib/tataru/resource_type_pool.rb', line 14

def resource_desc_for(symbol)
  @pool[symbol]
end