Module: Solstice

Defined in:
lib/solstice.rb,
lib/solstice/version.rb

Constant Summary collapse

VERSION =
"3.4.0"

Class Method Summary collapse

Class Method Details

.assets_pathObject



28
29
30
# File 'lib/solstice.rb', line 28

def assets_path
  @assets_path ||= File.join gem_path, 'assets'
end

.compass?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/solstice.rb', line 34

def compass?
  defined?(::Compass::Frameworks)
end

.fonts_pathObject



22
23
24
# File 'lib/solstice.rb', line 22

def fonts_path
  File.join assets_path, 'fonts'
end

.gem_pathObject



16
17
18
# File 'lib/solstice.rb', line 16

def gem_path
  @gem_path ||= File.expand_path '..', File.dirname(__FILE__)
end

.javascripts_pathObject



25
26
27
# File 'lib/solstice.rb', line 25

def javascripts_path
  File.join assets_path, 'javascripts'
end

.load!Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/solstice.rb', line 5

def load!
  register_compass_extension if compass?
  if rails?
    register_rails_engine
  elsif lotus?
    register_lotus
  elsif sprockets?
    register_sprockets
  end
  configure_sass
end

.lotus?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/solstice.rb', line 40

def lotus?
  defined?(::Lotus)
end

.rails?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/solstice.rb', line 37

def rails?
  defined?(::Rails)
end

.sprockets?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/solstice.rb', line 31

def sprockets?
  defined?(::Sprockets)
end

.stylesheets_pathObject



19
20
21
# File 'lib/solstice.rb', line 19

def stylesheets_path
  File.join assets_path, 'stylesheets'
end