Sha256: b26bdcb397f2a460ca4c95b745d769a845e3fc3b8b2693419799d93b655fa456

Contents?: true

Size: 466 Bytes

Versions: 14

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

require 'json'

module Ad
  module AgentArchitecture
    module Dsl
      module Actions
        # Save workflow graph to JSON file
        class SaveJson
          def initialize(workflow_hash)
            @workflow_hash = workflow_hash
          end

          def save(file_name)
            # Pretty JSON
            File.write(file_name, JSON.pretty_generate(@workflow_hash))
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ad-agent_architecture-0.0.22 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.21 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.20 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.19 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.18 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.17 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.16 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.15 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.14 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.13 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.12 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.11 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.10 lib/ad/agent_architecture/dsl/actions/save_json.rb
ad-agent_architecture-0.0.9 lib/ad/agent_architecture/dsl/actions/save_json.rb