Class: Bard::CLI::Config::Server
- Inherits:
-
Struct
- Object
- Struct
- Bard::CLI::Config::Server
- Defined in:
- lib/bard/config.rb
Instance Attribute Summary collapse
-
#path(*args) ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#path(*args) ⇒ Object
Returns the value of attribute path
60 61 62 |
# File 'lib/bard/config.rb', line 60 def path @path end |
Class Method Details
.setting(*fields) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/bard/config.rb', line 61 def self.setting *fields fields.each do |field| define_method field do |*args| if args.length == 1 send :"#{field}=", args.first elsif args.length == 0 super() else raise ArgumentError end end end end |
Instance Method Details
#default_ping ⇒ Object
77 78 79 80 |
# File 'lib/bard/config.rb', line 77 def default_ping uri = URI.parse("ssh://#{ssh}") "http://#{uri.host}" end |