Class: Taketo::Constructs::Environment
- Inherits:
-
BaseConstruct
- Object
- BaseConstruct
- Taketo::Constructs::Environment
- Defined in:
- lib/taketo/constructs/environment.rb
Instance Attribute Summary
Attributes inherited from BaseConstruct
#default_server_config, #name, #parent
Instance Method Summary collapse
- #has_servers? ⇒ Boolean
-
#initialize(name) ⇒ Environment
constructor
A new instance of Environment.
- #project_name ⇒ Object
- #rails_env ⇒ Object
Methods inherited from BaseConstruct
#node_type, #parents, #path, #qualified_name
Methods included from AssociatedNodes
Constructor Details
#initialize(name) ⇒ Environment
Returns a new instance of Environment.
10 11 12 |
# File 'lib/taketo/constructs/environment.rb', line 10 def initialize(name) super(name) end |
Instance Method Details
#has_servers? ⇒ Boolean
26 27 28 |
# File 'lib/taketo/constructs/environment.rb', line 26 def has_servers? has_deeply_nested_nodes?(:servers) end |
#project_name ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/taketo/constructs/environment.rb', line 14 def project_name if parent.is_a?(Project) parent.name else "" end end |
#rails_env ⇒ Object
22 23 24 |
# File 'lib/taketo/constructs/environment.rb', line 22 def rails_env name.to_s end |