Class: ActiveGraphql::Client::Actions::Action::FormatOutputs
- Inherits:
-
Object
- Object
- ActiveGraphql::Client::Actions::Action::FormatOutputs
- Defined in:
- lib/active_graphql/client/actions/action/format_outputs.rb
Overview
converts ruby object in to grapqhl output string
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(outputs) ⇒ FormatOutputs
constructor
A new instance of FormatOutputs.
Constructor Details
#initialize(outputs) ⇒ FormatOutputs
Returns a new instance of FormatOutputs.
9 10 11 |
# File 'lib/active_graphql/client/actions/action/format_outputs.rb', line 9 def initialize(outputs) @outputs = outputs end |
Instance Method Details
#call ⇒ Object
13 14 15 |
# File 'lib/active_graphql/client/actions/action/format_outputs.rb', line 13 def call Array.wrap(outputs).map { |it| formatted(it) }.join(', ') end |