grand_central 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/lib/grand_central/action.rb +9 -1
- data/lib/grand_central/model.rb +6 -0
- data/lib/grand_central/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ce1be864e18e6da104f6e4e6083318879be5b2d
|
4
|
+
data.tar.gz: 0b2d0885c198e42daada1e7b6b01b266b858edac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe753980b9b1e88591556a881c630b40c7698e1a077b52f793859d58f79511627d1f852d70bcabd5749116dacd10017832598a6edec7a42beb8a656bc7fe1e5e
|
7
|
+
data.tar.gz: 531e6e2d83ba79cd8278d78ec475c35a546ac464702a3859f8bc9cc2ffad0c5f8cfa13a79044a3d56fd0593e75edf19ac3294148f337f1497d39b3a13e072892
|
data/lib/grand_central/action.rb
CHANGED
@@ -42,13 +42,17 @@ module GrandCentral
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.call(*args)
|
45
|
-
|
45
|
+
self[*args].call
|
46
46
|
end
|
47
47
|
|
48
48
|
def self.[](*args)
|
49
49
|
DelayedDispatch.new(self, store, args)
|
50
50
|
end
|
51
51
|
|
52
|
+
def self.to_proc
|
53
|
+
proc { |*args| call *args.flatten(1) }
|
54
|
+
end
|
55
|
+
|
52
56
|
# A DelayedDispatch is an object that represents a dispatch that is intended
|
53
57
|
# to happen later. Arguments can be provided upfront, which will be used as
|
54
58
|
# the first args to the action constructor when the dispatch occurs.
|
@@ -74,6 +78,10 @@ module GrandCentral
|
|
74
78
|
@store.dispatch @action_class.new(*@args, *handle_bowser_event(args))
|
75
79
|
end
|
76
80
|
|
81
|
+
def to_proc
|
82
|
+
proc { |*args| call *args.flatten(1) }
|
83
|
+
end
|
84
|
+
|
77
85
|
# Add support for Bowser::Event args. This is so that front-end apps can
|
78
86
|
# handle DOM events in a much more convenient way.
|
79
87
|
def handle_bowser_event args
|
data/lib/grand_central/model.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grand_central
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Gaskins
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
97
|
rubyforge_project:
|
98
|
-
rubygems_version: 2.
|
98
|
+
rubygems_version: 2.6.8
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
101
|
summary: State and action management for Opal apps
|