Class: Lanes::Extensions::Definition
- Inherits:
-
Object
- Object
- Lanes::Extensions::Definition
- Includes:
- Concerns::AttrAccessorWithDefault
- Defined in:
- lib/lanes/extension.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Class Method Summary collapse
Instance Method Summary collapse
- #client_bootstrap_data(view) ⇒ Object
- #client_namespace ⇒ Object
- #client_paths ⇒ Object
- #javascript_include ⇒ Object
- #route(route_set) ⇒ Object
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
8 9 10 |
# File 'lib/lanes/extension.rb', line 8 def context @context end |
Class Method Details
.components(*names) ⇒ Object
21 22 23 |
# File 'lib/lanes/extension.rb', line 21 def self.components(*names) Components.enable(*names) end |
Instance Method Details
#client_bootstrap_data(view) ⇒ Object
25 26 27 |
# File 'lib/lanes/extension.rb', line 25 def client_bootstrap_data(view) {} end |
#client_namespace ⇒ Object
33 34 35 |
# File 'lib/lanes/extension.rb', line 33 def client_namespace identifier.underscore.camelize end |
#client_paths ⇒ Object
37 38 39 |
# File 'lib/lanes/extension.rb', line 37 def client_paths [ self.root_path.join("client") ] end |
#javascript_include ⇒ Object
29 30 31 |
# File 'lib/lanes/extension.rb', line 29 def javascript_include self.identifier + ".js" end |
#route(route_set) ⇒ Object
41 42 43 44 45 46 |
# File 'lib/lanes/extension.rb', line 41 def route(route_set) routes_config = root_path.join('config','routes.rb') if routes_config.exist? require routes_config end end |