Class: PoolParty::DependencyResolver
- Defined in:
- lib/poolparty/dependency_resolver/dependency_resolver.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#properties_hash ⇒ Object
readonly
Returns the value of attribute properties_hash.
-
#the_cloud ⇒ Object
readonly
Returns the value of attribute the_cloud.
Class Method Summary collapse
Instance Method Summary collapse
-
#compile ⇒ Object
Compile the clouds properties_hash into the format required by the dependency resolver This methods should be overwritten by the supclassed methods.
-
#initialize(hsh, contxt = nil) ⇒ DependencyResolver
constructor
A new instance of DependencyResolver.
- #permitted_resource_options ⇒ Object
- #tf(count) ⇒ Object
Constructor Details
#initialize(hsh, contxt = nil) ⇒ DependencyResolver
Returns a new instance of DependencyResolver.
13 14 15 16 17 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 13 def initialize(hsh, contxt=nil) raise DependencyResolverException.new('must pass a hash') if hsh.nil? || !(hsh.instance_of?(OrderedHash) || hsh.instance_of?(Hash)) @properties_hash = hsh @the_cloud = contxt end |
Instance Attribute Details
#properties_hash ⇒ Object (readonly)
Returns the value of attribute properties_hash.
11 12 13 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 11 def properties_hash @properties_hash end |
#the_cloud ⇒ Object (readonly)
Returns the value of attribute the_cloud.
11 12 13 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 11 def the_cloud @the_cloud end |
Class Method Details
.compile(hsh, contxt = nil) ⇒ Object
25 26 27 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 25 def self.compile(hsh, contxt=nil) new(hsh, contxt).compile end |
.permitted_resource_options(rules = {}) ⇒ Object
29 30 31 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 29 def self.(rules={}) ||= rules end |
Instance Method Details
#compile ⇒ Object
Compile the clouds properties_hash into the format required by the dependency resolver This methods should be overwritten by the supclassed methods
21 22 23 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 21 def compile() raise "Not Implemented" end |
#permitted_resource_options ⇒ Object
33 34 35 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 33 def self.class. end |
#tf(count) ⇒ Object
37 38 39 |
# File 'lib/poolparty/dependency_resolver/dependency_resolver.rb', line 37 def tf(count) "\t" * count end |