Module: Isomorfeus

Defined in:
lib/isomorfeus/redux/config.rb,
lib/isomorfeus/redux/imports.rb,
lib/isomorfeus/browser_store_api.rb,
lib/isomorfeus/execution_environment.rb

Defined Under Namespace

Modules: BrowserStoreApi, Redux

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_androidtvObject

Returns the value of attribute on_androidtv.



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

def on_androidtv
  @on_androidtv
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.



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

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_padObject

Returns the value of attribute on_pad.



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

def on_pad
  @on_pad
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

.on_tvObject

Returns the value of attribute on_tv.



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

def on_tv
  @on_tv
end

.on_tvosObject

Returns the value of attribute on_tvos.



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

def on_tvos
  @on_tvos
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

Returns:

  • (Boolean)


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

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

.on_androidtv?Boolean

Returns:

  • (Boolean)


68
69
70
71
# File 'lib/isomorfeus/execution_environment.rb', line 68

def on_androidtv?
  # true if running in react-native on androidtv
  @on_androidtv
end

.on_browser?Boolean

Returns:

  • (Boolean)


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

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

.on_database?Boolean

Returns:

  • (Boolean)


58
59
60
61
# File 'lib/isomorfeus/execution_environment.rb', line 58

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

.on_desktop?Boolean

Returns:

  • (Boolean)


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

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

.on_ios?Boolean

TODO the following need to be reworked a little, as react native is no longer a target

Returns:

  • (Boolean)


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

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

.on_mobile?Boolean

Returns:

  • (Boolean)


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

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

.on_pad?Boolean

Returns:

  • (Boolean)


53
54
55
56
# File 'lib/isomorfeus/execution_environment.rb', line 53

def on_pad?
  # true if running on a pad
  @on_pad
end

.on_server?Boolean

Returns:

  • (Boolean)


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

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

.on_ssr?Boolean

Returns:

  • (Boolean)


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

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

.on_tv?Boolean

Returns:

  • (Boolean)


73
74
75
76
# File 'lib/isomorfeus/execution_environment.rb', line 73

def on_tv?
  # true if running in react-native on a tv
  @on_tv
end

.on_tvos?Boolean

Returns:

  • (Boolean)


63
64
65
66
# File 'lib/isomorfeus/execution_environment.rb', line 63

def on_tvos?
  # true if running in react-native on tvOS
  @on_tvos
end