Class: Dcc::Transform::Result
- Inherits:
-
Object
- Object
- Dcc::Transform::Result
- Defined in:
- lib/dcc/transform/result.rb
Overview
Output of an XSLT transform.
Instance Attribute Summary collapse
-
#engine ⇒ Object
readonly
Returns the value of attribute engine.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
-
#initialize(payload:, engine:) ⇒ Result
constructor
A new instance of Result.
- #to_json(*_args) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(payload:, engine:) ⇒ Result
Returns a new instance of Result.
9 10 11 12 |
# File 'lib/dcc/transform/result.rb', line 9 def initialize(payload:, engine:) @payload = payload @engine = engine end |
Instance Attribute Details
#engine ⇒ Object (readonly)
Returns the value of attribute engine.
7 8 9 |
# File 'lib/dcc/transform/result.rb', line 7 def engine @engine end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
7 8 9 |
# File 'lib/dcc/transform/result.rb', line 7 def payload @payload end |
Instance Method Details
#to_json(*_args) ⇒ Object
18 19 20 21 |
# File 'lib/dcc/transform/result.rb', line 18 def to_json(*_args) require "json" ::JSON.pretty_generate(engine: @engine, payload: @payload) end |
#to_s ⇒ Object
14 15 16 |
# File 'lib/dcc/transform/result.rb', line 14 def to_s @payload end |