Module: Alphonse::Configs::Setting

Included in:
Alphonse::Config
Defined in:
lib/alphonse/configs/setting.rb

Instance Method Summary collapse

Instance Method Details

#app_name(value) ⇒ Object



14
15
16
# File 'lib/alphonse/configs/setting.rb', line 14

def app_name(value)
  set_attr :app_name => value
end

#branch(value) ⇒ Object



30
31
32
# File 'lib/alphonse/configs/setting.rb', line 30

def branch(value)
  set_attr :branch => value
end

#env_path(value) ⇒ Object



34
35
36
# File 'lib/alphonse/configs/setting.rb', line 34

def env_path(value)
  set_attr :env_path => value
end

#git_repo(value) ⇒ Object



26
27
28
# File 'lib/alphonse/configs/setting.rb', line 26

def git_repo(value)
  set_attr :git_repo => value
end

#hosts(*value) ⇒ Object



18
19
20
# File 'lib/alphonse/configs/setting.rb', line 18

def hosts(*value)
  set_attr :hosts => [*value].flatten
end

#path(value) ⇒ Object



22
23
24
# File 'lib/alphonse/configs/setting.rb', line 22

def path(value)
  set_attr :path => (value[-1] == '/' ? value : "#{value}/")
end

#restart_command(value) ⇒ Object



46
47
48
# File 'lib/alphonse/configs/setting.rb', line 46

def restart_command(value)
  set_attr :restart_command => value
end

#ruby_bin_path(value) ⇒ Object



38
39
40
# File 'lib/alphonse/configs/setting.rb', line 38

def ruby_bin_path(value)
  set_attr :ruby_bin_path => value
end

#start_command(value) ⇒ Object



42
43
44
# File 'lib/alphonse/configs/setting.rb', line 42

def start_command(value)
  set_attr :start_command => value
end

#user(value) ⇒ Object

TODO: evaluate attributes to allow attribute reuse E.g.

user = "user_name"
path = "/full/path/to/#{user}" => "/full/path/to/user_name"


10
11
12
# File 'lib/alphonse/configs/setting.rb', line 10

def user(value)
  set_attr :user => value
end