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
67 68 69 |
# File 'lib/bard/config.rb', line 67 def path @path end |
Class Method Details
.setting(*fields) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/bard/config.rb', line 68 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
84 85 86 87 |
# File 'lib/bard/config.rb', line 84 def default_ping uri = URI.parse("ssh://#{ssh}") "http://#{uri.host}" end |