Module: Strockets::Config

Included in:
Strockets
Defined in:
lib/strockets/config.rb

Constant Summary collapse

STITCH_EXCEPTIONS_ON_TRUE =
[%r[/application\.js], /\.jst/, %r[/vendor/], %r[/gems/]]
STITCH_EXCEPTIONS_ON_FALSE =
[]

Instance Method Summary collapse

Instance Method Details

#defaults_to_stitch=(default) ⇒ Object



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

def defaults_to_stitch=(default)
  @defaults_to_stitch = default
end

#defaults_to_stitch?Boolean Also known as: defaults_to_stitch

Returns:

  • (Boolean)


14
15
16
# File 'lib/strockets/config.rb', line 14

def defaults_to_stitch?
  @defaults_to_stitch.nil? ? true : @defaults_to_stitch
end

#namespaceObject



6
7
8
# File 'lib/strockets/config.rb', line 6

def namespace
  @namespace || "require"
end

#namespace=(namespace) ⇒ Object



10
11
12
# File 'lib/strockets/config.rb', line 10

def namespace=(namespace)
  @namespace = namespace
end

#stitch_exceptionsObject



23
24
25
26
# File 'lib/strockets/config.rb', line 23

def stitch_exceptions
  @stitch_exceptions ||
    defaults_to_stitch? ? STITCH_EXCEPTIONS_ON_TRUE : STITCH_EXCEPTIONS_ON_FALSE
end

#stitch_exceptions=(stitch_exceptions) ⇒ Object



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

def stitch_exceptions=(stitch_exceptions)
  @stitch_exceptions = stitch_exceptions
end

#stitch_pathObject



32
33
34
# File 'lib/strockets/config.rb', line 32

def stitch_path
  File.expand_path("../assets",__FILE__)
end