Module: VisibilityJs

Defined in:
lib/visibilityjs.rb,
lib/visibilityjs/railtie.rb

Overview

Add visibility.js path to the Rails assets paths.

Defined Under Namespace

Classes: Railtie

Class Method Summary collapse

Class Method Details

.assets_pathObject

Path where is the visibility.js located.



7
8
9
# File 'lib/visibilityjs.rb', line 7

def self.assets_path
  Pathname(__FILE__).dirname
end

.install(sprockets) ⇒ Object

Add assets path to standalone Sprockets environment.



12
13
14
# File 'lib/visibilityjs.rb', line 12

def self.install(sprockets)
  sprockets.append_path(assets_path)
end