Class: WIP::Runner::Shell::Handlers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/wip/runner/shell/handlers/base.rb

Direct Known Subclasses

Script, System

Instance Method Summary collapse

Constructor Details

#initialize(content, &block) ⇒ Base



8
9
10
11
# File 'lib/wip/runner/shell/handlers/base.rb', line 8

def initialize(content, &block)
  @content = clean(content)
  instance_exec(&block) if block_given?
end

Instance Method Details

#descriptionObject

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/wip/runner/shell/handlers/base.rb', line 13

def description
  raise NotImplementedError
end

#execute(io, env, &block) ⇒ Object

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/wip/runner/shell/handlers/base.rb', line 17

def execute(io, env, &block)
  raise NotImplementedError
end

#typeObject



21
22
23
# File 'lib/wip/runner/shell/handlers/base.rb', line 21

def type
  @type ||= self.class.name.split('::').last
end