Class: RedfishTools::Cli::Serve
- Inherits:
-
Object
- Object
- RedfishTools::Cli::Serve
- Defined in:
- lib/redfish_tools/cli/serve.rb
Instance Method Summary collapse
-
#initialize(path, options) ⇒ Serve
constructor
A new instance of Serve.
- #run ⇒ Object
Constructor Details
#initialize(path, options) ⇒ Serve
Returns a new instance of Serve.
9 10 11 12 |
# File 'lib/redfish_tools/cli/serve.rb', line 9 def initialize(path, ) @path = path @options = end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/redfish_tools/cli/serve.rb', line 14 def run datastore = RedfishTools::DataStore.new(@path) server = RedfishTools::Server.new(datastore, @options[:user], @options[:pass], Port: @options[:port], BindAddress: @options[:bind], SSLEnable: @options[:ssl], SSLCertName: [%w[CN localhost]]) trap("INT") { server.shutdown } server.start end |