Module: Isomorfeus

Defined in:
lib/isomorfeus/redux_config.rb,
lib/isomorfeus/execution_environment.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.on_browserObject

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_ssrObject

Returns the value of attribute on_ssr.



5
6
7
# File 'lib/isomorfeus/execution_environment.rb', line 5

def on_ssr
  @on_ssr
end

.storeObject (readonly)

Returns the value of attribute store.



4
5
6
# File 'lib/isomorfeus/redux_config.rb', line 4

def store
  @store
end

.store_initializedObject (readonly)

Returns the value of attribute store_initialized.



3
4
5
# File 'lib/isomorfeus/redux_config.rb', line 3

def store_initialized
  @store_initialized
end

Class Method Details

.force_init_store!Object



12
13
14
15
16
17
# File 'lib/isomorfeus/redux_config.rb', line 12

def force_init_store!
  # at least one reducer must have been added at this stage
  # this happened in isomorfeus-react.rb, where the component reducers were added
  @store = Redux::Store.init!
  `Opal.Isomorfeus.store = #@store`
end

.init_storeObject



6
7
8
9
10
# File 'lib/isomorfeus/redux_config.rb', line 6

def init_store
  return if store_initialized
  @store_initialized = true
  force_init_store!
end

.on_browser?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/isomorfeus/execution_environment.rb', line 7

def on_browser?
  @on_browser
end

.on_server?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/isomorfeus/execution_environment.rb', line 15

def on_server?
  false
end

.on_ssr?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/isomorfeus/execution_environment.rb', line 11

def on_ssr?
  @on_ssr
end