fie 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +0,0 @@
1
- require 'native'
2
-
3
- module Fie
4
- module Native
5
- class Event
6
- include Native
7
-
8
- def initialize(event_name)
9
- @event_name = event_name
10
- end
11
-
12
- def dispatch
13
- Native(`document.dispatchEvent(new Event(#{ @event_name }))`)
14
- end
15
- end
16
- end
17
- end
@@ -1,24 +0,0 @@
1
- module Fie
2
- module Native
3
- class Timeout
4
- def initialize(time = 0, &block)
5
- @proc = block
6
- @timeout = `setTimeout(#{block}, time)`
7
- end
8
-
9
- def clear
10
- `clearTimeout(#{@timeout})`
11
- end
12
-
13
- def fast_forward
14
- `clearTimeout(#{@timeout})`
15
-
16
- begin
17
- @proc.call
18
- rescue Exception => exception
19
- puts exception.message
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,9 +0,0 @@
1
- require 'fie/native'
2
-
3
- module Fie
4
- class Pool < Fie::Native::ActionCableChannel
5
- def received(data)
6
- @cable.commander.process_command(data['command'], data['parameters'])
7
- end
8
- end
9
- end
@@ -1,23 +0,0 @@
1
- require 'fie/native'
2
-
3
- module Fie
4
- class Util
5
- class << self
6
- include Fie::Native
7
-
8
- def exec_js(name, arguments = [])
9
- Native(`eval(#{ name })(#{ arguments.join(' ') })`)
10
- end
11
-
12
- def view_variables
13
- variable_elements = Element.document.query_selector_all('[fie-variable]:not([fie-variable=""])')
14
-
15
- variable_elements.map do |variable_element|
16
- variable_name = variable_element['fie-variable']
17
- variable_value = variable_element['fie-value']
18
- [variable_name, variable_value]
19
- end.to_h
20
- end
21
- end
22
- end
23
- end