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
Returns a new instance of 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 37 38 39 40 41 42 43 |
# 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, ), theia: Server.new( project_name, :theia, "[email protected]", "Sites/#{project_name}", false, ), gubs: Server.new( project_name, :gubs, "[email protected]:22022", "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.
45 46 47 |
# File 'lib/bard/config.rb', line 45 def servers @servers end |
Instance Method Details
#data(*paths) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/bard/config.rb', line 53 def data *paths if paths.length == 0 Array(@data) else @data = paths end end |