Class: Bard::CLI::Config::Server
- Inherits:
-
Struct
- Object
- Struct
- Bard::CLI::Config::Server
- Defined in:
- lib/bard/config.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path
58 59 60 |
# File 'lib/bard/config.rb', line 58 def path @path end |
Class Method Details
.setting(*fields) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/bard/config.rb', line 59 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
75 76 77 78 |
# File 'lib/bard/config.rb', line 75 def default_ping uri = URI.parse("ssh://#{ssh}") "http://#{uri.host}" end |