trade-o-matic 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trade-o-matic/command.rb +21 -19
- data/lib/trade-o-matic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8456dede1b422d4c20965a17755b97edbf07c70c
|
4
|
+
data.tar.gz: 27307fa137c0f62e9eecb745a21cf6be03d9d18e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f69540a225cc44955859d156d5dcfc75596c45188c2f7aa40223511065486ffd9d371c75e7488fc0b19ec0f2fed69342c837e331df438f1362935f9e04cf4af
|
7
|
+
data.tar.gz: 6c987df306700297bab6dfed9848bcf5816aae6baf1d9fa15641aa71fd5fb790f172ebb15e5007fbd82904655e14b620373e3dc70fe0430239b674aefdfcd1ce
|
@@ -1,25 +1,27 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module Trader
|
2
|
+
module Command
|
3
|
+
def self.new(*_attributes)
|
4
|
+
attr_names = []
|
5
|
+
attr_defaults = {}
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
_attributes.each do |att|
|
8
|
+
if att.is_a? Hash
|
9
|
+
attr_defaults.merge att
|
10
|
+
attr_names += att.keys
|
11
|
+
else
|
12
|
+
attr_names << att
|
13
|
+
end
|
12
14
|
end
|
13
|
-
end
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
Struct.new(*attr_names) do
|
17
|
+
define_method(:initialize) do |kwargs={}|
|
18
|
+
kwargs = attr_defaults.merge kwargs
|
19
|
+
attr_values = attr_names.map { |a| kwargs[a] }
|
20
|
+
super(*attr_values)
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
+
define_method(:perform) {}
|
24
|
+
end
|
23
25
|
end
|
24
26
|
end
|
25
|
-
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trade-o-matic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ignacio Baixas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|