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_androidObject

Returns the value of attribute on_android.



9
10
11
# File 'lib/isomorfeus/execution_environment.rb', line 9

def on_android
  @on_android
end

.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_databaseObject

Returns the value of attribute on_database.



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

def on_database
  @on_database
end

.on_desktopObject

Returns the value of attribute on_desktop.



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

def on_desktop
  @on_desktop
end

.on_iosObject

Returns the value of attribute on_ios.



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

def on_ios
  @on_ios
end

.on_mobileObject

Returns the value of attribute on_mobile.



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

def on_mobile
  @on_mobile
end

.on_serverObject

Returns the value of attribute on_server.



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

def on_server
  @on_server
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_android?Boolean



38
39
40
41
# File 'lib/isomorfeus/execution_environment.rb', line 38

def on_android?
  # true if running in react-native on android
  @on_android
end

.on_browser?Boolean



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

def on_browser?
  # true if running on browser
  @on_browser
end

.on_database?Boolean



48
49
50
51
# File 'lib/isomorfeus/execution_environment.rb', line 48

def on_database?
  # true if running in database context
  @on_database
end

.on_desktop?Boolean



28
29
30
31
# File 'lib/isomorfeus/execution_environment.rb', line 28

def on_desktop?
  # true if running in electron
  @on_desktop
end

.on_ios?Boolean



33
34
35
36
# File 'lib/isomorfeus/execution_environment.rb', line 33

def on_ios?
  # true if running in react-native on ios
  @on_ios
end

.on_mobile?Boolean



43
44
45
46
# File 'lib/isomorfeus/execution_environment.rb', line 43

def on_mobile?
  # true if running in react-native
  @on_mobile
end

.on_server?Boolean



23
24
25
26
# File 'lib/isomorfeus/execution_environment.rb', line 23

def on_server?
  # true if running on server
  @on_server
end

.on_ssr?Boolean



18
19
20
21
# File 'lib/isomorfeus/execution_environment.rb', line 18

def on_ssr?
  # true if running in server side rendering in restricted node js vm
  @on_ssr
end