mumukit-platform 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mumukit/platform/model.rb +7 -3
- data/lib/mumukit/platform/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 920ae1e633fbdb41486b34f521cecbb0dd87296675c1a322e05df7e685e2535c
|
4
|
+
data.tar.gz: 1e0d88436ab1352d2eada7c031cca7771b881914a110c1d983a5b4e0de55b431
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1ceb632828b17180c1405a2ddd4dfb65e63182cccd8ae88ad38e74dc7f946b3ba7334ffe47088493ff80276b90b62592b79d480fc4221084fce939109b64d14
|
7
|
+
data.tar.gz: c9426f3a1cb1c4b0223bbddde42dcd074a16ecfdd5672abff266212bfcce5f31ed7e4cec33f6830baa79ab0c13e1c31577b9291c205bec3e393319169bc38ace
|
@@ -3,10 +3,14 @@ require 'active_model'
|
|
3
3
|
class Mumukit::Platform::Model
|
4
4
|
include ActiveModel::Model
|
5
5
|
|
6
|
+
def empty?
|
7
|
+
as_json.empty?
|
8
|
+
end
|
9
|
+
|
6
10
|
def self.model_attr_accessor(*keys)
|
7
11
|
attr_accessor(*keys)
|
8
|
-
define_singleton_method :parse do |
|
9
|
-
new
|
12
|
+
define_singleton_method :parse do |hash|
|
13
|
+
hash ? new(hash.slice(*keys)) : new
|
10
14
|
end
|
11
15
|
end
|
12
16
|
|
@@ -15,6 +19,6 @@ class Mumukit::Platform::Model
|
|
15
19
|
end
|
16
20
|
|
17
21
|
def self.load(json)
|
18
|
-
new
|
22
|
+
json ? new(JSON.parse(json)) : new
|
19
23
|
end
|
20
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit-core
|
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
|
-
rubygems_version: 2.7.
|
140
|
+
rubygems_version: 2.7.5
|
141
141
|
signing_key:
|
142
142
|
specification_version: 4
|
143
143
|
summary: Shared Mumuki Platform Components
|