Class: BoringBuilder::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/boringbuilder/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(format:, path:, reference:, runtime:, platform:, artifact_id: nil, artifact_name: nil) ⇒ Result

Returns a new instance of Result.



5
6
7
# File 'lib/boringbuilder/result.rb', line 5

def initialize(format:, path:, reference:, runtime:, platform:, artifact_id: nil, artifact_name: nil)
  super
end

Instance Attribute Details

#artifact_idObject (readonly)

Returns the value of attribute artifact_id

Returns:

  • (Object)

    the current value of artifact_id



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def artifact_id
  @artifact_id
end

#artifact_nameObject (readonly)

Returns the value of attribute artifact_name

Returns:

  • (Object)

    the current value of artifact_name



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def artifact_name
  @artifact_name
end

#formatObject (readonly)

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def format
  @format
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def path
  @path
end

#platformObject (readonly)

Returns the value of attribute platform

Returns:

  • (Object)

    the current value of platform



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def platform
  @platform
end

#referenceObject (readonly)

Returns the value of attribute reference

Returns:

  • (Object)

    the current value of reference



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def reference
  @reference
end

#runtimeObject (readonly)

Returns the value of attribute runtime

Returns:

  • (Object)

    the current value of runtime



4
5
6
# File 'lib/boringbuilder/result.rb', line 4

def runtime
  @runtime
end

Instance Method Details

#artifact_published?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/boringbuilder/result.rb', line 17

def artifact_published?
  !artifact_id.nil?
end

#exported?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/boringbuilder/result.rb', line 9

def exported?
  !path.nil?
end

#published?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/boringbuilder/result.rb', line 13

def published?
  !reference.nil?
end

#to_hObject



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/boringbuilder/result.rb', line 21

def to_h
  {
    format: format,
    path: path,
    reference: reference,
    runtime: runtime,
    platform: platform,
    artifact_id: artifact_id,
    artifact_name: artifact_name
  }
end