Class: TypeScript::Node::CompileResult

Inherits:
Object
  • Object
show all
Defined in:
lib/typescript-node/compile_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(js, exit_status, stdout, stderr) ⇒ String

Constructor

Parameters:

  • js (String)

    compiled JavaScript

  • exit_status (Fixnum)

    return code of tsc command

  • stdout (String)

    Standard out



13
14
15
16
17
18
# File 'lib/typescript-node/compile_result.rb', line 13

def initialize(js, exit_status, stdout, stderr)
  @js = js
  @exit_status = exit_status
  @stdout = stdout
  @stderr = stderr
end

Instance Attribute Details

#exit_statusObject (readonly)

Returns the value of attribute exit_status.



20
21
22
# File 'lib/typescript-node/compile_result.rb', line 20

def exit_status
  @exit_status
end

#jsObject (readonly)

Returns the value of attribute js.



20
21
22
# File 'lib/typescript-node/compile_result.rb', line 20

def js
  @js
end

#source_mapObject (readonly)

Returns the value of attribute source_map.



20
21
22
# File 'lib/typescript-node/compile_result.rb', line 20

def source_map
  @source_map
end

#stderrObject (readonly)

Returns the value of attribute stderr.



20
21
22
# File 'lib/typescript-node/compile_result.rb', line 20

def stderr
  @stderr
end

#stdoutObject (readonly)

Returns the value of attribute stdout.



20
21
22
# File 'lib/typescript-node/compile_result.rb', line 20

def stdout
  @stdout
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/typescript-node/compile_result.rb', line 22

def success?
  @exit_status == 0
end