Class: Vtk::Commands::Module::Service

Inherits:
Vtk::Command show all
Defined in:
lib/vtk/commands/module/service.rb

Overview

Adds a new module service class to vets-api

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Vtk::Command

#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which

Constructor Details

#initialize(name, options) ⇒ Service

Returns a new instance of Service.



12
13
14
15
16
17
# File 'lib/vtk/commands/module/service.rb', line 12

def initialize(name, options)
  @name = name
  @options = options

  super()
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



10
11
12
# File 'lib/vtk/commands/module/service.rb', line 10

def name
  @name
end

#optionsObject

Returns the value of attribute options.



10
11
12
# File 'lib/vtk/commands/module/service.rb', line 10

def options
  @options
end

Instance Method Details

#execute(_input: $stdin, _output: $stdout) ⇒ Object



19
20
21
# File 'lib/vtk/commands/module/service.rb', line 19

def execute(_input: $stdin, _output: $stdout)
  create_service(name, options)
end