Class: DRep::DRepEnvironment

Inherits:
Object
  • Object
show all
Defined in:
lib/drep/core/drep_environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdin, stdout, stderr, options) ⇒ DRepEnvironment

Returns a new instance of DRepEnvironment.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/drep/core/drep_environment.rb', line 30

def initialize(stdin, stdout, stderr, options)
  if valid?(stdin, stdout, stderr)
    @stdin  = stdin
    @stdout = stdout
    @stderr = stderr
  else
    raise('Not all standard streams are valid')
  end

  if valid?(options)
    @options = options
  else
    raise('Options were not specified')
  end
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



28
29
30
# File 'lib/drep/core/drep_environment.rb', line 28

def options
  @options
end

#stderrObject (readonly)

Returns the value of attribute stderr.



26
27
28
# File 'lib/drep/core/drep_environment.rb', line 26

def stderr
  @stderr
end

#stdinObject (readonly)

Returns the value of attribute stdin.



26
27
28
# File 'lib/drep/core/drep_environment.rb', line 26

def stdin
  @stdin
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



26
27
28
# File 'lib/drep/core/drep_environment.rb', line 26

def stdout
  @stdout
end