Sha256: 0d356926eb17925365e61fdaa352150b2c5dd34c9943cdd60bb5b545a2905b42

Contents?: true

Size: 843 Bytes

Versions: 3

Compression:

Stored size: 843 Bytes

Contents

# frozen_string_literal: true

module KepplerFrontend
  module Views
    # CodeHandler
    class Output
      def initialize(view_data)
        @view = view_data
      end

      def html
        service('html').output
      rescue StandardError
        false
      end

      def action
        service('actions').output
      rescue StandardError
        false
      end

      def scss
        service('css').output
      rescue StandardError
        false
      end

      def js
        service('js').output
      rescue StandardError
        false
      end

      def remote_js
        service('remote_js').output
      rescue StandardError
        false
      end

      private

      def service(name)
        model = "KepplerFrontend::Views::#{name.camelize}Handler"
        model.constantize.new(@view)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
keppler-2.1.18 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/output.rb
keppler-2.1.17 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/output.rb
keppler-2.1.16 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/output.rb