Class: Jackal::Stacks::Formatter::CodeFetcher
- Inherits:
-
Formatter
- Object
- Formatter
- Jackal::Stacks::Formatter::CodeFetcher
- Defined in:
- lib/jackal-stacks/formatter/code_fetcher.rb
Overview
Format code fetcher data for stacks
Constant Summary collapse
- SOURCE =
'code_fetcher'
- DESTINATION =
'stacks'
Instance Method Summary collapse
-
#format(payload) ⇒ Object
Format payload.
Instance Method Details
#format(payload) ⇒ Object
Format payload
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jackal-stacks/formatter/code_fetcher.rb', line 15 def format(payload) if(payload.get(:data, :code_fetcher)) payload.set(:data, :stacks, :asset, payload.get(:data, :code_fetcher, :asset) ) payload.set(:data, :stacks, :reference, payload.get(:data, :code_fetcher, :info, :reference) ) payload.set(:data, :stacks, :project, [payload.get(:data, :code_fetcher, :info, :owner), payload.get(:data, :code_fetcher, :info, :name)].join('_') ) end end |