Class: Ringc::Executor

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Defined in:
lib/ringc/executor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, options) ⇒ Executor

Returns a new instance of Executor.



9
10
11
12
# File 'lib/ringc/executor.rb', line 9

def initialize(type, options)
  @type = type
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/ringc/executor.rb', line 7

def options
  @options
end

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/ringc/executor.rb', line 7

def type
  @type
end

Instance Method Details

#execute(command) ⇒ Object



14
15
16
# File 'lib/ringc/executor.rb', line 14

def execute(command)
  executor.run(command)
end