class CapUtil::ServerRoles::ServerDef
Attributes
hostname[R]
options[R]
Public Class Methods
new(hostname, options_list = nil)
click to toggle source
# File lib/cap-util/server_roles.rb, line 64 def initialize(hostname, options_list = nil) @hostname = hostname @options = {} # so, weird cap bug. options have to match type when using them in # a task's definition. so if you have (string) 'primary' option, you # have to use a string in your task defs. # this is not the case for the role names (string or symbol works). # so, I'm just defining each option, both in string (how it comes from # the configs) and symbol form. (options_list || []).each do |option| @options[option.to_s] = true @options[option.to_sym] = true end end