Class: Lanes::Extensions::Definition
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
15
16
17
|
# File 'lib/lanes/extension/definition.rb', line 15
def context
@context
end
|
Class Method Details
.components(*names) ⇒ Object
31
32
33
|
# File 'lib/lanes/extension/definition.rb', line 31
def self.components(*names)
Components.enable(*names)
end
|
.inherited(klass) ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/lanes/extension/definition.rb', line 7
def self.inherited(klass)
if Extensions.controlling_locked
ALL.unshift(klass)
else
ALL << klass
end
end
|
Instance Method Details
#client_bootstrap_data(view) ⇒ Object
35
36
37
|
# File 'lib/lanes/extension/definition.rb', line 35
def client_bootstrap_data(view)
{}
end
|
#client_images ⇒ Object
55
56
57
58
59
|
# File 'lib/lanes/extension/definition.rb', line 55
def client_images
images = []
root_path.join('client','images').find{|path| images << path if path.file? }
images
end
|
#client_namespace ⇒ Object
47
48
49
|
# File 'lib/lanes/extension/definition.rb', line 47
def client_namespace
identifier.underscore.camelize
end
|
#client_paths ⇒ Object
51
52
53
|
# File 'lib/lanes/extension/definition.rb', line 51
def client_paths
[ root_path.join('client') ]
end
|
#javascript_include ⇒ Object
43
44
45
|
# File 'lib/lanes/extension/definition.rb', line 43
def javascript_include
self.identifier
end
|
#on_boot ⇒ Object
68
69
|
# File 'lib/lanes/extension/definition.rb', line 68
def on_boot
end
|
#route(route_set) ⇒ Object
61
62
63
64
65
66
|
# File 'lib/lanes/extension/definition.rb', line 61
def route(route_set)
routes_config = root_path.join('config','routes.rb')
if routes_config.exist?
require routes_config
end
end
|
#stylesheet_include ⇒ Object
39
40
41
|
# File 'lib/lanes/extension/definition.rb', line 39
def stylesheet_include
self.identifier + '/styles'
end
|