Class: Tataru::ResourceTypePool
- Inherits:
-
Object
- Object
- Tataru::ResourceTypePool
- Defined in:
- lib/tataru/resource_type_pool.rb
Overview
class resource type pool
Instance Method Summary collapse
- #add_resource_desc(symbol, classconstant) ⇒ Object
-
#initialize ⇒ ResourceTypePool
constructor
A new instance of ResourceTypePool.
- #resource_desc_exist?(symbol) ⇒ Boolean
- #resource_desc_for(symbol) ⇒ Object
Constructor Details
#initialize ⇒ ResourceTypePool
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
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 |