Sha256: 471f8ce5417e5c0ff2beebf805b11005b8b1628194419faacaed5d1c319a845c

Contents?: true

Size: 679 Bytes

Versions: 11

Compression:

Stored size: 679 Bytes

Contents

# frozen_string_literal: true

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

      def install
        out_file = File.open(view_js, 'w')
        out_file.puts("// #{@view.name} javascript Erb template")
        out_file.close
        true
      rescue StandardError
        false
      end

      def uninstall
        File.delete(view_js) if File.exist?(view_js)
        true
      rescue StandardError
        false
      end

      private

      def view_js
        front = KepplerFrontend::Urls::Front.new
        front.view_js(@view.name)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
keppler-2.1.15 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.14 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.13 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.12 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.11 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.10 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.9 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.8 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.7 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.6 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb
keppler-2.1.5 installer/core/rockets/keppler_frontend/app/services/keppler_frontend/views/remote_js_handler.rb