Class: Ibex::Artifact
- Inherits:
-
Object
- Object
- Ibex::Artifact
- Defined in:
- lib/ibex/artifact_set.rb,
sig/ibex/artifact_set.rbs
Overview
One fully rendered file in a parser generation.
Instance Attribute Summary collapse
- #content ⇒ String readonly
- #kind ⇒ Symbol readonly
- #mode ⇒ Integer? readonly
- #path ⇒ String readonly
Instance Method Summary collapse
-
#initialize(kind:, path:, content:, mode: nil) ⇒ Artifact
constructor
A new instance of Artifact.
Constructor Details
#initialize(kind:, path:, content:, mode: nil) ⇒ Artifact
Returns a new instance of Artifact.
13 14 15 16 17 18 19 20 21 |
# File 'lib/ibex/artifact_set.rb', line 13 def initialize(kind:, path:, content:, mode: nil) raise ArgumentError, "artifact path must not be empty" if path.empty? @kind = kind @path = path.dup.freeze @content = content.dup.freeze @mode = mode freeze end |
Instance Attribute Details
#content ⇒ String (readonly)
9 10 11 |
# File 'lib/ibex/artifact_set.rb', line 9 def content @content end |
#kind ⇒ Symbol (readonly)
7 8 9 |
# File 'lib/ibex/artifact_set.rb', line 7 def kind @kind end |
#mode ⇒ Integer? (readonly)
10 11 12 |
# File 'lib/ibex/artifact_set.rb', line 10 def mode @mode end |
#path ⇒ String (readonly)
8 9 10 |
# File 'lib/ibex/artifact_set.rb', line 8 def path @path end |