Module: StringExtensions

Included in:
String
Defined in:
lib/string.rb

Instance Method Summary collapse

Instance Method Details

#personalize(app_name, hash) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/string.rb', line 3

def personalize(app_name, hash)
  self.
    gsub('~app_name~', app_name).
    gsub('~github_account~', hash[:deploy][:app_server][:user].to_s).
    gsub('~domain~', hash[:deploy][:app_server][:domain].to_s).
    gsub('~user~', hash[:deploy][:app_server][:user].to_s).
    gsub('~port~',  hash[:deploy][:app_server][:port].to_s).
    gsub('~keys~', hash[:deploy][:app_server][:keys].to_s)
end