Sha256: e0610165a4c7643c871902560ecd7b04909e6c967c5bce7d843e90a23c793877

Contents?: true

Size: 755 Bytes

Versions: 13

Compression:

Stored size: 755 Bytes

Contents

module Repla
  module Dependencies
    # Dependency view
    class View < Repla::View
      ROOT_ACCESS_DIRECTORY = File.join(__dir__, '../../')
      HTML_DIRECTORY = File.join(__dir__, '../html/')
      VIEW_TEMPLATE = File.join(HTML_DIRECTORY, 'index.html')

      def initialize
        super
        self.root_access_directory_path = File.expand_path(
          ROOT_ACCESS_DIRECTORY
        )
        load_file(VIEW_TEMPLATE)
      end

      ADD_MISSING_DEPENDENCY_FUNCTION = 'addMissingDependency'.freeze
      def add_missing_dependency(name, type, installation_instructions = nil)
        do_javascript_function(ADD_MISSING_DEPENDENCY_FUNCTION,
                               [name, type, installation_instructions])
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
repla-0.10.4 lib/repla/dependencies/lib/view.rb
repla-0.10.3 lib/repla/dependencies/lib/view.rb
repla-0.10.2 lib/repla/dependencies/lib/view.rb
repla-0.10.1 lib/repla/dependencies/lib/view.rb
repla-0.10.0 lib/repla/dependencies/lib/view.rb
repla-0.9.2 lib/repla/dependencies/lib/view.rb
repla-0.9.1 lib/repla/dependencies/lib/view.rb
repla-0.8.4 lib/repla/dependencies/lib/view.rb
repla-0.8.3 lib/repla/dependencies/lib/view.rb
repla-0.8.2 lib/repla/dependencies/lib/view.rb
repla-0.8.1 lib/repla/dependencies/lib/view.rb
repla-0.8.0 lib/repla/dependencies/lib/view.rb
repla-0.7.6 lib/repla/dependencies/lib/view.rb