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_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_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_mobileObject

Returns the value of attribute on_mobile.



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

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

.on_tabletObject

Returns the value of attribute on_tablet.



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

def on_tablet
  @on_tablet
end

.on_tvObject

Returns the value of attribute on_tv.



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

def on_tv
  @on_tv
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)


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

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

.on_desktop?Boolean

Returns:

  • (Boolean)


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

def on_desktop?
  # true if running as desktop app
  @on_desktop
end

.on_mobile?Boolean

Returns:

  • (Boolean)


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

def on_mobile?
  # true if running on mobile
  @on_mobile
end

.on_server?Boolean

Returns:

  • (Boolean)


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

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

.on_ssr?Boolean

Returns:

  • (Boolean)


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

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

.on_tablet?Boolean

Returns:

  • (Boolean)


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

def on_tablet?
  # true if running on a tablet
  @on_tablet
end

.on_tv?Boolean

Returns:

  • (Boolean)


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

def on_tv?
  # true if running on a tv
  @on_tv
end