lib/taketo/constructs/environment.rb in taketo-0.1.3 vs lib/taketo/constructs/environment.rb in taketo-0.2.0.alpha
- old
+ new
@@ -4,10 +4,11 @@
module Taketo
module Constructs
class Environment < BaseConstruct
has_nodes :servers, :server
+ has_nodes :groups, :group
def initialize(name)
super(name)
end
@@ -15,9 +16,17 @@
if parent.is_a?(Project)
parent.name
else
""
end
+ end
+
+ def rails_env
+ name.to_s
+ end
+
+ def has_servers?
+ has_deeply_nested_nodes?(:servers)
end
end
end
end