Class: Bard::CLI::Config
- Inherits:
-
Object
- Object
- Bard::CLI::Config
- Defined in:
- lib/bard/config.rb
Defined Under Namespace
Classes: Server
Instance Attribute Summary collapse
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
- #data(*paths) ⇒ Object
-
#initialize(project_name, path) ⇒ Config
constructor
A new instance of Config.
- #server(key, &block) ⇒ Object
Constructor Details
#initialize(project_name, path) ⇒ Config
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/bard/config.rb', line 5 def initialize project_name, path @project_name = project_name @servers = { local: Server.new( project_name, :local, false, "./", false, ), gubs: Server.new( project_name, :gubs, "[email protected]", "Sites/#{project_name}", false, ), ci: Server.new( project_name, :ci, "[email protected]:22022", "jobs/#{project_name}/workspace", false, ), staging: Server.new( project_name, :staging, "www@#{project_name}.botandrose.com:22022", ), } load_local_config! path end |
Instance Attribute Details
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
38 39 40 |
# File 'lib/bard/config.rb', line 38 def servers @servers end |
Instance Method Details
#data(*paths) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/bard/config.rb', line 46 def data *paths if paths.length == 0 Array(@data) else @data = paths end end |