Class: Glslkit::Bundle::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/glslkit/bundle.rb

Overview

kind: nil(成功) | :preprocess(#include解決の失敗) | :validation(Validatorのエラー)。 kind == :validation でも vertex/fragment は入る(前処理自体は成功している)。 manifest は kind.nil? のときだけ入る。

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, source_digest:, kind: nil, vertex: nil, fragment: nil, manifest: nil, diagnostics: [], error: nil) ⇒ Result

Returns a new instance of Result.



38
39
40
41
42
43
44
45
46
47
# File 'lib/glslkit/bundle.rb', line 38

def initialize(name:, source_digest:, kind: nil, vertex: nil, fragment: nil, manifest: nil, diagnostics: [], error: nil)
  @name = name
  @kind = kind
  @source_digest = source_digest
  @vertex = vertex
  @fragment = fragment
  @manifest = manifest
  @diagnostics = diagnostics
  @error = error
end

Instance Attribute Details

#diagnosticsObject (readonly)

Returns the value of attribute diagnostics.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def diagnostics
  @diagnostics
end

#errorObject (readonly)

Returns the value of attribute error.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def error
  @error
end

#fragmentObject (readonly)

Returns the value of attribute fragment.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def fragment
  @fragment
end

#kindObject (readonly)

Returns the value of attribute kind.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def kind
  @kind
end

#manifestObject (readonly)

Returns the value of attribute manifest.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def manifest
  @manifest
end

#nameObject (readonly)

Returns the value of attribute name.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def name
  @name
end

#source_digestObject (readonly)

Returns the value of attribute source_digest.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def source_digest
  @source_digest
end

#vertexObject (readonly)

Returns the value of attribute vertex.



36
37
38
# File 'lib/glslkit/bundle.rb', line 36

def vertex
  @vertex
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/glslkit/bundle.rb', line 49

def ok?
  kind.nil?
end