Class: Ibex::Artifact
- Inherits:
-
Object
- Object
- Ibex::Artifact
- Defined in:
- lib/ibex/artifact_set.rb
Overview
One fully rendered file in a parser generation.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
: String.
-
#kind ⇒ Object
readonly
: Symbol.
-
#mode ⇒ Object
readonly
: Integer?.
-
#path ⇒ Object
readonly
: String.
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 ⇒ Object (readonly)
: String
9 10 11 |
# File 'lib/ibex/artifact_set.rb', line 9 def content @content end |
#kind ⇒ Object (readonly)
: Symbol
7 8 9 |
# File 'lib/ibex/artifact_set.rb', line 7 def kind @kind end |
#mode ⇒ Object (readonly)
: Integer?
10 11 12 |
# File 'lib/ibex/artifact_set.rb', line 10 def mode @mode end |
#path ⇒ Object (readonly)
: String
8 9 10 |
# File 'lib/ibex/artifact_set.rb', line 8 def path @path end |