mirror of
https://github.com/ai/visibilityjs.git
synced 2026-01-14 15:57:59 -05:00
20 lines
421 B
Ruby
20 lines
421 B
Ruby
# Used only for Ruby on Rails gem to tell, that gem contain `lib/assets` with
|
|
# visibility.js file.
|
|
|
|
module VisibilityJs
|
|
|
|
# Path where is the visibility.js located.
|
|
def self.assets_path
|
|
Pathname(__FILE__).dirname
|
|
end
|
|
|
|
# Add assets path to standalone Sprockets environment.
|
|
def self.install(sprockets)
|
|
sprockets.append_path(assets_path)
|
|
end
|
|
end
|
|
|
|
if defined?(Rails)
|
|
require 'visibilityjs/railtie'
|
|
end
|