module FlagIconsRails
Constants
- FLAG_ICONS_CSS_VERSION
- VERSION
Public Class Methods
load!()
click to toggle source
# File lib/flag-icons-rails.rb, line 5 def load! if rails? register_rails_engine else configure_sass end end
rails?()
click to toggle source
# File lib/flag-icons-rails.rb, line 17 def rails? defined?(::Rails) end
root()
click to toggle source
# File lib/flag-icons-rails.rb, line 13 def root @root ||= File.expand_path('..', File.dirname(__FILE__)) end
Private Class Methods
assets_path()
click to toggle source
# File lib/flag-icons-rails.rb, line 27 def assets_path @assets_path ||= File.join(root, 'app', 'assets') end
configure_sass()
click to toggle source
# File lib/flag-icons-rails.rb, line 31 def configure_sass require 'sass' ::Sass.load_paths << stylesheets_path end
register_rails_engine()
click to toggle source
# File lib/flag-icons-rails.rb, line 37 def register_rails_engine require 'flag-icons-rails/rails/engine' require 'flag-icons-rails/rails/railtie' end
stylesheets_path()
click to toggle source
# File lib/flag-icons-rails.rb, line 23 def stylesheets_path File.join(assets_path, 'stylesheets') end