Module: Isomorfeus
- Defined in:
- lib/isomorfeus/config.rb,
lib/isomorfeus/top_level_ssr.rb,
lib/isomorfeus/react_view_helper.rb,
lib/isomorfeus/top_level_browser.rb,
lib/isomorfeus/execution_environment.rb
Defined Under Namespace
Modules: ReactViewHelper
Classes: TopLevel
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.env ⇒ Object
Returns the value of attribute env.
7
8
9
|
# File 'lib/isomorfeus/config.rb', line 7
def env
@env
end
|
.initial_state_fetched ⇒ Object
Returns the value of attribute initial_state_fetched.
4
5
6
|
# File 'lib/isomorfeus/config.rb', line 4
def initial_state_fetched
@initial_state_fetched
end
|
.initialized ⇒ Object
Returns the value of attribute initialized.
6
7
8
|
# File 'lib/isomorfeus/config.rb', line 6
def initialized
@initialized
end
|
.on_browser ⇒ Object
Returns the value of attribute on_browser.
4
5
6
|
# File 'lib/isomorfeus/execution_environment.rb', line 4
def on_browser
@on_browser
end
|
.on_ssr ⇒ Object
Returns the value of attribute on_ssr.
5
6
7
|
# File 'lib/isomorfeus/execution_environment.rb', line 5
def on_ssr
@on_ssr
end
|
.server_side_rendering ⇒ Object
Returns the value of attribute server_side_rendering.
83
84
85
|
# File 'lib/isomorfeus/config.rb', line 83
def server_side_rendering
@server_side_rendering
end
|
.top_component ⇒ Object
Returns the value of attribute top_component.
5
6
7
|
# File 'lib/isomorfeus/config.rb', line 5
def top_component
@top_component
end
|
Class Method Details
.add_client_init_class_name(init_class_name) ⇒ Object
25
26
27
|
# File 'lib/isomorfeus/config.rb', line 25
def add_client_init_class_name(init_class_name)
client_init_class_names << init_class_name
end
|
.add_client_option(key, value = nil) ⇒ Object
29
30
31
32
|
# File 'lib/isomorfeus/config.rb', line 29
def add_client_option(key, value = nil)
self.class.attr_accessor(key)
self.send("#{key}=", value)
end
|
.cached_component_class(class_name) ⇒ Object
40
41
42
43
|
# File 'lib/isomorfeus/config.rb', line 40
def cached_component_class(class_name)
return cached_component_classes[class_name] if cached_component_classes.key?(class_name)
cached_component_classes[class_name] = "::#{class_name}".constantize
end
|
.cached_component_classes ⇒ Object
35
36
37
|
# File 'lib/isomorfeus/config.rb', line 35
def cached_component_classes
@cached_component_classes ||= {}
end
|
.configuration(&block) ⇒ Object
86
87
88
|
# File 'lib/isomorfeus/config.rb', line 86
def configuration(&block)
block.call(self)
end
|
.development? ⇒ Boolean
58
59
60
|
# File 'lib/isomorfeus/config.rb', line 58
def development?
@development
end
|
.execute_init_classes ⇒ Object
45
46
47
48
49
|
# File 'lib/isomorfeus/config.rb', line 45
def execute_init_classes
client_init_class_names.each do |constant|
constant.constantize.send(:init)
end
end
|
.force_render ⇒ Object
74
75
76
77
|
# File 'lib/isomorfeus/config.rb', line 74
def force_render
top_component.JS.forceUpdate()
nil
end
|
.init ⇒ Object
9
10
11
12
13
14
|
# File 'lib/isomorfeus/config.rb', line 9
def init
return if initialized
@initialized = true
Isomorfeus.init_store
execute_init_classes
end
|
.on_browser? ⇒ Boolean
7
8
9
|
# File 'lib/isomorfeus/execution_environment.rb', line 7
def on_browser?
@on_browser
end
|
.on_server? ⇒ Boolean
15
16
17
|
# File 'lib/isomorfeus/execution_environment.rb', line 15
def on_server?
false
end
|
.on_ssr? ⇒ Boolean
11
12
13
|
# File 'lib/isomorfeus/execution_environment.rb', line 11
def on_ssr?
@on_ssr
end
|
.production? ⇒ Boolean
62
63
64
|
# File 'lib/isomorfeus/config.rb', line 62
def production?
@production
end
|
.ssr_contexts ⇒ Object
109
110
111
|
# File 'lib/isomorfeus/config.rb', line 109
def ssr_contexts
@ssr_contexts ||= {}
end
|
.test? ⇒ Boolean
66
67
68
|
# File 'lib/isomorfeus/config.rb', line 66
def test?
@test
end
|
.version ⇒ Object
113
114
115
|
# File 'lib/isomorfeus/config.rb', line 113
def version
Isomorfeus::VERSION
end
|