Class: Lagoon::Result
- Inherits:
-
Data
- Object
- Data
- Lagoon::Result
- Defined in:
- lib/lagoon/result.rb,
sig/lagoon.rbs
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#counts ⇒ Object
readonly
Returns the value of attribute counts.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#warnings ⇒ Object
readonly
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize(path:, content:, warnings: [], counts: {}) ⇒ Result
constructor
A new instance of Result.
- #to_path ⇒ String
- #to_s ⇒ String
Constructor Details
#initialize(path:, content:, warnings: [], counts: {}) ⇒ Result
Returns a new instance of Result.
5 6 7 8 9 10 11 12 |
# File 'lib/lagoon/result.rb', line 5 def initialize(path:, content:, warnings: [], counts: {}) super( path: path.to_s.freeze, content: content.to_s.freeze, warnings: warnings.map(&:to_s).freeze, counts: counts.transform_keys(&:to_sym).freeze ) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content
4 5 6 |
# File 'lib/lagoon/result.rb', line 4 def content @content end |
#counts ⇒ Object (readonly)
Returns the value of attribute counts
4 5 6 |
# File 'lib/lagoon/result.rb', line 4 def counts @counts end |
#path ⇒ Object (readonly)
Returns the value of attribute path
4 5 6 |
# File 'lib/lagoon/result.rb', line 4 def path @path end |
#warnings ⇒ Object (readonly)
Returns the value of attribute warnings
4 5 6 |
# File 'lib/lagoon/result.rb', line 4 def warnings @warnings end |
Instance Method Details
#to_path ⇒ String
18 19 20 |
# File 'lib/lagoon/result.rb', line 18 def to_path path end |
#to_s ⇒ String
14 15 16 |
# File 'lib/lagoon/result.rb', line 14 def to_s path end |