matestack-ui-core 0.6.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of matestack-ui-core might be problematic. Click here for more details.

Files changed (129) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +230 -0
  4. data/Rakefile +34 -0
  5. data/app/assets/config/basemate_ui_core_manifest.js +2 -0
  6. data/app/assets/javascripts/basemate/ui/core/application.js +15 -0
  7. data/app/assets/stylesheets/basemate/ui/core/application.css +15 -0
  8. data/app/concepts/absolute/cell/absolute.rb +17 -0
  9. data/app/concepts/absolute/view/absolute.haml +3 -0
  10. data/app/concepts/action/cell/action.rb +52 -0
  11. data/app/concepts/action/js/action.js +49 -0
  12. data/app/concepts/action/view/action.haml +3 -0
  13. data/app/concepts/app/cell/app.rb +76 -0
  14. data/app/concepts/app/js/app.js +27 -0
  15. data/app/concepts/app/js/store.js +71 -0
  16. data/app/concepts/app/utils/app_node.rb +53 -0
  17. data/app/concepts/app/view/app.haml +4 -0
  18. data/app/concepts/async/cell/async.rb +10 -0
  19. data/app/concepts/async/js/async.js +57 -0
  20. data/app/concepts/async/view/async.haml +2 -0
  21. data/app/concepts/br/cell/br.rb +5 -0
  22. data/app/concepts/br/view/br.haml +5 -0
  23. data/app/concepts/button/cell/button.rb +5 -0
  24. data/app/concepts/button/view/button.haml +7 -0
  25. data/app/concepts/component/cell/dynamic.rb +226 -0
  26. data/app/concepts/component/cell/static.rb +16 -0
  27. data/app/concepts/component/js/anonym-dynamic-component.js +10 -0
  28. data/app/concepts/component/js/component.js +60 -0
  29. data/app/concepts/component/utils/component_node.rb +69 -0
  30. data/app/concepts/component/view/children.haml +2 -0
  31. data/app/concepts/component/view/dynamic.haml +6 -0
  32. data/app/concepts/component/view/dynamic_without_rerender.haml +2 -0
  33. data/app/concepts/component/view/response.haml +2 -0
  34. data/app/concepts/component/view/response_dynamic.haml +7 -0
  35. data/app/concepts/component/view/response_dynamic_without_rerender.haml +3 -0
  36. data/app/concepts/component/view/static.haml +1 -0
  37. data/app/concepts/core/js/core.js +27 -0
  38. data/app/concepts/core/js/event-hub.js +5 -0
  39. data/app/concepts/div/cell/div.rb +6 -0
  40. data/app/concepts/div/view/div.haml +3 -0
  41. data/app/concepts/footer/cell/footer.rb +5 -0
  42. data/app/concepts/footer/view/footer.haml +3 -0
  43. data/app/concepts/form/cell/form.rb +71 -0
  44. data/app/concepts/form/cell/inline.rb +9 -0
  45. data/app/concepts/form/cell/input.rb +74 -0
  46. data/app/concepts/form/cell/select.rb +73 -0
  47. data/app/concepts/form/cell/submit.rb +9 -0
  48. data/app/concepts/form/js/form.js +136 -0
  49. data/app/concepts/form/view/form.haml +2 -0
  50. data/app/concepts/form/view/inline.haml +6 -0
  51. data/app/concepts/form/view/input.haml +29 -0
  52. data/app/concepts/form/view/select.haml +72 -0
  53. data/app/concepts/form/view/submit.haml +3 -0
  54. data/app/concepts/header/cell/header.rb +5 -0
  55. data/app/concepts/header/view/header.haml +3 -0
  56. data/app/concepts/heading/cell/heading.rb +5 -0
  57. data/app/concepts/heading/view/heading.haml +50 -0
  58. data/app/concepts/html/cell/html.rb +17 -0
  59. data/app/concepts/html/js/html.js +10 -0
  60. data/app/concepts/html/view/html.haml +3 -0
  61. data/app/concepts/icon/cell/icon.rb +5 -0
  62. data/app/concepts/icon/view/icon.haml +6 -0
  63. data/app/concepts/img/cell/img.rb +5 -0
  64. data/app/concepts/img/view/img.haml +1 -0
  65. data/app/concepts/input/cell/input.rb +5 -0
  66. data/app/concepts/input/view/input.haml +3 -0
  67. data/app/concepts/label/cell/label.rb +5 -0
  68. data/app/concepts/label/view/label.haml +7 -0
  69. data/app/concepts/li/cell/li.rb +5 -0
  70. data/app/concepts/li/view/li.haml +6 -0
  71. data/app/concepts/link/cell/link.rb +24 -0
  72. data/app/concepts/link/view/link.haml +6 -0
  73. data/app/concepts/main/cell/main.rb +5 -0
  74. data/app/concepts/main/view/main.haml +3 -0
  75. data/app/concepts/nav/cell/nav.rb +5 -0
  76. data/app/concepts/nav/view/nav.haml +3 -0
  77. data/app/concepts/ol/cell/ol.rb +5 -0
  78. data/app/concepts/ol/view/ol.haml +3 -0
  79. data/app/concepts/onclick/cell/onclick.rb +6 -0
  80. data/app/concepts/onclick/js/onclick.js +21 -0
  81. data/app/concepts/onclick/view/onclick.haml +2 -0
  82. data/app/concepts/page/cell/content.rb +5 -0
  83. data/app/concepts/page/cell/page.rb +128 -0
  84. data/app/concepts/page/js/content.js +17 -0
  85. data/app/concepts/page/utils/page_node.rb +66 -0
  86. data/app/concepts/page/view/content.haml +7 -0
  87. data/app/concepts/page/view/page.haml +9 -0
  88. data/app/concepts/partial/cell/partial.rb +5 -0
  89. data/app/concepts/partial/view/partial.haml +2 -0
  90. data/app/concepts/pg/cell/pg.rb +5 -0
  91. data/app/concepts/pg/view/pg.haml +8 -0
  92. data/app/concepts/plain/cell/plain.rb +10 -0
  93. data/app/concepts/progress/cell/progress.rb +5 -0
  94. data/app/concepts/progress/view/progress.haml +3 -0
  95. data/app/concepts/section/cell/section.rb +5 -0
  96. data/app/concepts/section/view/section.haml +3 -0
  97. data/app/concepts/shared/utils/to_cell.rb +126 -0
  98. data/app/concepts/slot/cell/slot.rb +10 -0
  99. data/app/concepts/slot/view/slot.haml +2 -0
  100. data/app/concepts/span/cell/span.rb +5 -0
  101. data/app/concepts/span/view/span.haml +3 -0
  102. data/app/concepts/table/cell/table.rb +5 -0
  103. data/app/concepts/table/view/table.haml +3 -0
  104. data/app/concepts/td/cell/td.rb +5 -0
  105. data/app/concepts/td/view/td.haml +8 -0
  106. data/app/concepts/th/cell/th.rb +5 -0
  107. data/app/concepts/th/view/th.haml +8 -0
  108. data/app/concepts/tr/cell/tr.rb +5 -0
  109. data/app/concepts/tr/view/tr.haml +3 -0
  110. data/app/concepts/transition/cell/transition.rb +31 -0
  111. data/app/concepts/transition/js/transition.js +26 -0
  112. data/app/concepts/transition/view/transition.haml +7 -0
  113. data/app/concepts/ul/cell/ul.rb +5 -0
  114. data/app/concepts/ul/view/ul.haml +3 -0
  115. data/app/concepts/view/cell/view.rb +7 -0
  116. data/app/concepts/view/js/view.js +42 -0
  117. data/app/concepts/view/view/view.haml +2 -0
  118. data/app/controllers/basemate/ui/core/application_controller.rb +9 -0
  119. data/app/controllers/basemate/ui/core/docs_controller.rb +17 -0
  120. data/app/helpers/matestack/ui/core/application_helper.rb +35 -0
  121. data/config/routes.rb +3 -0
  122. data/lib/matestack/ui/core.rb +15 -0
  123. data/lib/matestack/ui/core/engine.rb +19 -0
  124. data/lib/matestack/ui/core/version.rb +7 -0
  125. data/lib/tasks/matestack/ui/core_tasks.rake +4 -0
  126. data/vendor/assets/javascripts/manifest.json +4 -0
  127. data/vendor/assets/javascripts/matestack-ui-core.js +15055 -0
  128. data/vendor/assets/javascripts/matestack-ui-core.js.map +1 -0
  129. metadata +277 -0
@@ -0,0 +1,24 @@
1
+ module Link::Cell
2
+ class Link < Component::Cell::Static
3
+
4
+ REQUIRED_KEYS = [:path]
5
+
6
+ def setup
7
+ @tag_attributes.merge!({ "class": options[:class],
8
+ "id": component_id,
9
+ "method": options[:method],
10
+ "target": options[:target] ||= nil
11
+ })
12
+ end
13
+
14
+ def link_path
15
+ if options[:path].is_a?(Symbol)
16
+ return ::Rails.application.routes.url_helpers.send(options[:path], options[:params])
17
+ end
18
+ if options[:path].is_a?(String)
19
+ return options[:path]
20
+ end
21
+ end
22
+
23
+ end
24
+ end
@@ -0,0 +1,6 @@
1
+ - if options[:text].nil?
2
+ = link_to link_path, @tag_attributes do
3
+ - if block_given?
4
+ = yield
5
+ - else
6
+ = link_to options[:text], link_path, @tag_attributes
@@ -0,0 +1,5 @@
1
+ module Main::Cell
2
+ class Main < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ %main{@tag_attributes}
2
+ - if block_given?
3
+ = yield
@@ -0,0 +1,5 @@
1
+ module Nav::Cell
2
+ class Nav < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ %nav{@tag_attributes}
2
+ - if block_given?
3
+ = yield
@@ -0,0 +1,5 @@
1
+ module Ol::Cell
2
+ class Ol < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ %ol{"class": options[:class], "id": component_id}
2
+ - if block_given?
3
+ = yield
@@ -0,0 +1,6 @@
1
+ module Onclick::Cell
2
+ class Onclick < Component::Cell::Dynamic
3
+
4
+
5
+ end
6
+ end
@@ -0,0 +1,21 @@
1
+ import Vue from 'vue/dist/vue.esm'
2
+
3
+ import matestackEventHub from 'core/js/event-hub'
4
+
5
+ import componentMixin from 'component/js/component'
6
+
7
+ const componentDef = {
8
+ mixins: [componentMixin],
9
+ data: function(){
10
+ return { }
11
+ },
12
+ methods: {
13
+ perform: function(){
14
+ matestackEventHub.$emit(this.componentConfig["emit"], this.componentConfig["data"])
15
+ }
16
+ }
17
+ }
18
+
19
+ let component = Vue.component('onclick-cell', componentDef)
20
+
21
+ export default componentDef
@@ -0,0 +1,2 @@
1
+ %div{"@click": "perform"}
2
+ = yield
@@ -0,0 +1,5 @@
1
+ module Page::Cell
2
+ class Content < Component::Cell::Dynamic
3
+
4
+ end
5
+ end
@@ -0,0 +1,128 @@
1
+ module Page::Cell
2
+ class Page < Trailblazer::Cell
3
+
4
+ include ActionView::Helpers::TranslationHelper
5
+ include ::Cell::Haml
6
+ include ::Matestack::Ui::Core::ApplicationHelper
7
+ include ::Shared::Utils::ToCell
8
+
9
+ view_paths << "#{Matestack::Ui::Core::Engine.root}/app/concepts"
10
+
11
+ def initialize(model=nil, options={})
12
+ super
13
+ generate_page_name
14
+ set_app_class
15
+ @nodes = {}
16
+ @cells = {}
17
+ options[:controller_instance].instance_variables.each do |controller_instance_var_key|
18
+ unless controller_instance_var_key.to_s.start_with?("@_")
19
+ self.instance_variable_set(controller_instance_var_key, options[:controller_instance].instance_variable_get(controller_instance_var_key))
20
+ end
21
+ end
22
+ end
23
+
24
+ def prepare
25
+ true
26
+ end
27
+
28
+ def components(&block)
29
+ @nodes = ::Page::Utils::PageNode.build(self, nil, &block)
30
+ end
31
+
32
+ def nodes_to_cell
33
+ @nodes.each do |key, node|
34
+ @cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
35
+ end
36
+ end
37
+
38
+ def partial(&block)
39
+ return block
40
+ # ::Page::Utils::PageNode.build(self, included, &block)
41
+ end
42
+
43
+ def slot(&block)
44
+ # return block
45
+ ::Page::Utils::PageNode.build(self, nil, &block)
46
+ end
47
+
48
+
49
+ def show(component_key=nil, only_page=false)
50
+ prepare
51
+ response
52
+
53
+ render_mode = nil
54
+ render_mode = :only_page if only_page == true
55
+ render_mode = :render_page_with_app if !@app_class.nil? && only_page == false
56
+ render_mode = :only_page if @app_class.nil? && only_page == false
57
+ render_mode = :render_component if !component_key.nil?
58
+
59
+ case render_mode
60
+
61
+ when :only_page
62
+ nodes_to_cell
63
+ # keys_array = ["div_2","components", "partial_1", "components", "form_1"]
64
+ # puts @nodes.dig(*keys_array)
65
+ render :page
66
+ when :render_page_with_app
67
+ concept(@app_class).call(:show, @page_id, @nodes)
68
+ when :render_component
69
+ if component_key.include?("__")
70
+ keys_array = component_key.gsub("__", "__components__").split("__").map {|k| k.to_s}
71
+ page_content_keys = keys_array.select{|key| key.match(/^page_content_/)}
72
+ if page_content_keys.any?
73
+ keys_array = keys_array.drop(keys_array.find_index(page_content_keys[0])+2)
74
+ end
75
+ node = @nodes.dig(*keys_array)
76
+ cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
77
+ return cell.render_content
78
+ else
79
+ node = @nodes[component_key]
80
+ cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
81
+ return cell.render_content
82
+ end
83
+ end
84
+ end
85
+
86
+
87
+ def page_id
88
+ @custom_page_id ||= @page_id
89
+ end
90
+
91
+ private
92
+
93
+ def generate_page_name
94
+ name_parts = self.class.name.split("::").map { |name| name.underscore }
95
+ @page_id = name_parts.join("_")
96
+ end
97
+
98
+ def set_app_class
99
+ class_name = self.class.name
100
+ name_parts = class_name.split("::")
101
+ if name_parts.count <= 2
102
+ @app_class = nil
103
+ return
104
+ end
105
+
106
+ app_name = "#{name_parts[1]}"
107
+ begin
108
+ app_class = Apps.const_get(app_name)
109
+ if app_class.is_a?(Class)
110
+ @app_class = app_class
111
+ else
112
+ require_dependency "apps/#{app_name.underscore}"
113
+ app_class = Apps.const_get(app_name)
114
+ if app_class.is_a?(Class)
115
+ @app_class = app_class
116
+ else
117
+ @app_class = nil
118
+ end
119
+ end
120
+ rescue
121
+ @app_class = nil
122
+ end
123
+ end
124
+
125
+
126
+ end
127
+
128
+ end
@@ -0,0 +1,17 @@
1
+ import Vue from 'vue/dist/vue.esm'
2
+ import Vuex from 'vuex'
3
+ import componentMixin from 'component/js/component'
4
+
5
+ const componentDef = {
6
+ mixins: [componentMixin],
7
+ data: function(){
8
+ return {}
9
+ },
10
+ computed: Vuex.mapState({
11
+ asyncPageTemplate: state => state.pageTemplate,
12
+ })
13
+ }
14
+
15
+ let component = Vue.component('page-content-cell', componentDef)
16
+
17
+ export default componentDef
@@ -0,0 +1,66 @@
1
+ module Page::Utils
2
+ class PageNode
3
+
4
+ def self.build(page_instance, included_config, &block)
5
+ node = PageNode.new(page_instance, included_config)
6
+ node.instance_eval(&block)
7
+ node.hash
8
+ end
9
+
10
+ attr_reader :hash
11
+
12
+ def initialize(page_instance, included_config)
13
+ @hash = {}
14
+ @node_start_id = 0
15
+ @included_config = included_config
16
+ @page_instance = page_instance
17
+ page_instance.instance_variables.each do |page_instance_var_key|
18
+ self.instance_variable_set(page_instance_var_key, page_instance.instance_variable_get(page_instance_var_key))
19
+ end
20
+ end
21
+
22
+ def method_missing meth, *args, &block
23
+ begin
24
+ @page_instance.send(meth, *args, &block)
25
+ rescue
26
+ node_id = @node_start_id + 1
27
+ @node_start_id = node_id
28
+ current_node = "#{meth}_#{@node_start_id}"
29
+ @hash[current_node] = {}
30
+ @hash[current_node]["component_name"] = meth.to_s
31
+ @hash[current_node]["config"] = {}
32
+ @hash[current_node]["included_config"] = @included_config
33
+ @hash[current_node]["argument"] = nil
34
+
35
+ if args.second == :include
36
+ included = args.first
37
+ else
38
+ unless @included_config.nil?
39
+ included = @included_config
40
+ else
41
+ included = nil
42
+ end
43
+ end
44
+
45
+ if meth == :partial
46
+ partial_block = @page_instance.send(args.first, *args.drop(1))
47
+ @hash[current_node]["components"] = PageNode.build(
48
+ @page_instance, included, &partial_block
49
+ )
50
+ else
51
+ if args.first.is_a?(Hash)
52
+ @hash[current_node]["config"] = args.first
53
+ else
54
+ @hash[current_node]["argument"] = args.first
55
+ end
56
+
57
+ if block_given?
58
+ @hash[current_node]["components"] = PageNode.build(@page_instance, included, &block)
59
+ end
60
+ end
61
+ end
62
+
63
+ end
64
+
65
+ end
66
+ end
@@ -0,0 +1,7 @@
1
+ %div{"class": "matestack_page"}
2
+ %div{"v-if": "asyncPageTemplate == null"}
3
+ %div{"class": "matestack_page_content"}
4
+ - @children_cells.each do |key, cell|
5
+ = cell.call(:show)
6
+ %div{"v-if": "asyncPageTemplate != null"}
7
+ %v-runtime-template{":template":"asyncPageTemplate"}
@@ -0,0 +1,9 @@
1
+ - if context[:params][:only_page] == "true"
2
+ %div{class: "matestack_page_content"}
3
+ - @cells.each do |key, cell|
4
+ = cell.call(:show)
5
+ - else
6
+ %div{class: "matestack_page"}
7
+ %div{class: "matestack_page_content"}
8
+ - @cells.each do |key, cell|
9
+ = cell.call(:show)
@@ -0,0 +1,5 @@
1
+ module Partial::Cell
2
+ class Partial < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ - @children_cells.each do |key, cell|
2
+ = cell.call(:show)
@@ -0,0 +1,5 @@
1
+ module Pg::Cell
2
+ class Pg < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,8 @@
1
+ - if options[:text].nil?
2
+ %p{@tag_attributes}
3
+ - if block_given?
4
+ = yield
5
+
6
+ - else
7
+ %p{@tag_attributes}
8
+ = options[:text]
@@ -0,0 +1,10 @@
1
+ module Plain::Cell
2
+ class Plain < Component::Cell::Static
3
+
4
+ def show
5
+ @argument
6
+ end
7
+
8
+ end
9
+
10
+ end
@@ -0,0 +1,5 @@
1
+ module Progress::Cell
2
+ class Progress < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ %progress{"id": component_id, "class": options[:class], "value": options[:value], "max": options[:max]}
2
+ - if block_given?
3
+ = yield
@@ -0,0 +1,5 @@
1
+ module Section::Cell
2
+ class Section < Component::Cell::Static
3
+
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ %section{@tag_attributes}
2
+ - if block_given?
3
+ = yield
@@ -0,0 +1,126 @@
1
+ module Shared::Utils::ToCell
2
+
3
+ def to_cell(key, component_name, config, argument, children, included_config)
4
+ request_uri = context[:request].env["REQUEST_URI"]
5
+ query_string = context[:request].env["QUERY_STRING"]
6
+
7
+ config.merge!(component_key: key)
8
+ config.merge!(children: children)
9
+ config.merge!(origin_url: request_uri.gsub("?" + query_string, ""))
10
+ config.merge!(url_params: context[:params])
11
+ config.merge!(included_config: included_config)
12
+
13
+ if component_name.start_with?("custom")
14
+ return resolve_custom_component(component_name, argument, config)
15
+ else
16
+ return resolve_core_component(component_name, argument, config)
17
+ end
18
+
19
+ end
20
+
21
+ private
22
+
23
+ def resolve_custom_component(component_name, argument, config)
24
+ name = component_name.gsub("_", "/")
25
+
26
+ path = name.split("/")[1..-1]
27
+ path_camelized = path.map { |x| x.camelize }
28
+
29
+ if path_camelized.count == 1
30
+ class_name = "#{path_camelized[0]}::Cell::#{path_camelized[0]}"
31
+ rewritten_path = [path[0], "cell", path[0]]
32
+ else
33
+ class_name = path_camelized[0..-2].join("::")
34
+ class_name += "::Cell::#{path_camelized[-1]}"
35
+ rewritten_path = path[0..-2]
36
+ rewritten_path << "cell"
37
+ rewritten_path << path[-1]
38
+ end
39
+
40
+ custom_component_class_name = "Components::" + class_name
41
+
42
+ begin
43
+ begin
44
+ component_class = Object.const_get(custom_component_class_name, false)
45
+ rescue => e
46
+ raise "#{e.message.nil? ? '': 'Got Error: '+e.message}. \
47
+ Make sure to define your custom component class correctly \
48
+ in \"matestack/components/#{rewritten_path.join('/')}.rb\""
49
+ end
50
+ if component_class.is_a?(Class)
51
+ return concept(component_class, argument, config)
52
+ else
53
+ raise "Given component #{component_class} is not a class. \
54
+ You might forget to add the component name to your component call"
55
+ end
56
+ rescue => e
57
+ raise "#{component_name} > #{e.message}"
58
+ end
59
+
60
+ end
61
+
62
+ def resolve_core_component(component_name, argument, config)
63
+ name = component_name.gsub("_", "/")
64
+
65
+ if name.include?("/")
66
+ name = name.gsub("/", "/cell/")
67
+ else
68
+ name = "#{name}/cell/#{name}"
69
+ end
70
+
71
+ path = name.split("/")
72
+ path_camelized = path.map { |x| x.camelize }
73
+ class_name = path_camelized.join("::")
74
+
75
+ begin
76
+ begin
77
+ component_class = Object.const_get(class_name, false)
78
+ rescue => e
79
+ begin
80
+ return resolve_namespaced_component(component_name, argument, config)
81
+ rescue => e
82
+ raise "#{e.message.nil? ? '': 'Got Error: '+e.message}. \
83
+ Component '#{component_name}' not found. Looking for Class '#{class_name}'. \
84
+ Make sure to prefix a custom component with 'custom_'"
85
+ end
86
+ end
87
+ return concept(component_class, argument, config)
88
+ rescue => e
89
+ raise "#{component_name} > #{e.message}"
90
+ end
91
+
92
+ end
93
+
94
+ def resolve_namespaced_component(component_name, argument, config)
95
+ name = component_name.gsub("_", "/")
96
+
97
+ path = name.split("/")[1..-1]
98
+ namespace = name.split("/")[0].camelize
99
+ path_camelized = path.map { |x| x.camelize }
100
+
101
+ if path_camelized.count == 1
102
+ class_name = "#{path_camelized[0]}::Cell::#{path_camelized[0]}"
103
+ rewritten_path = [path[0], "cell", path[0]]
104
+ else
105
+ class_name = path_camelized[0..-2].join("::")
106
+ class_name += "::Cell::#{path_camelized[-1]}"
107
+ rewritten_path = path[0..-2]
108
+ rewritten_path << "cell"
109
+ rewritten_path << path[-1]
110
+ end
111
+
112
+ namespaced_class_name = namespace + "::" + class_name
113
+
114
+ begin
115
+ begin
116
+ component_class = Object.const_get(namespaced_class_name, false)
117
+ rescue => e
118
+ raise "#{e.message}"
119
+ end
120
+ return concept(component_class, argument, config)
121
+ rescue => e
122
+ raise "#{e.message}"
123
+ end
124
+ end
125
+
126
+ end