colonel_kurtz_ruby 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -2
- data/lib/colonel_kurtz/model/blockable.rb +7 -1
- data/lib/colonel_kurtz/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: 74c1f3d095ab2ba08bfba4e099d8240c2aecb7ca
|
4
|
+
data.tar.gz: 7ca859d443dfae213bb375ad513f1ab0fedc5ecb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1b78306db8abd7fb4660b6d2158fe7ec8795d7a48eb37e69972ef03cd46ad6ee9825fa4a5d0e82ba1f4ff71aa0af64d289e26b25051625e92b6f3a6522221fd
|
7
|
+
data.tar.gz: f9c96de971b1c836534e187edccc07f1612121809acfbd49bfd9fae80e2b770a63b49c777b048bba9d4df04bb18548c75529a2fc7b643e2cab2d253fd0dea691
|
data/README.md
CHANGED
@@ -51,10 +51,16 @@ block.type
|
|
51
51
|
block.contents
|
52
52
|
#=> { "html" => "<p>Example</p>" }
|
53
53
|
|
54
|
+
block.parent
|
55
|
+
#=> nil
|
56
|
+
|
54
57
|
block.children
|
55
58
|
#=> [
|
56
|
-
|
57
|
-
]
|
59
|
+
# <ColonelKurtz::Block:0x007fb0eb7bf950....>
|
60
|
+
#]
|
61
|
+
|
62
|
+
block.children[0].parent
|
63
|
+
#=> <ColonelKurtz::Block:0x047ae78820c3c0b24...>
|
58
64
|
```
|
59
65
|
|
60
66
|
#### Model
|
@@ -104,3 +110,11 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
104
110
|
5. Create a new Pull Request
|
105
111
|
|
106
112
|
Viget (www.viget.com)
|
113
|
+
|
114
|
+
***
|
115
|
+
|
116
|
+
<a href="http://code.viget.com">
|
117
|
+
<img src="http://code.viget.com/github-banner.png" alt="Code At Viget">
|
118
|
+
</a>
|
119
|
+
|
120
|
+
Visit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com)
|
@@ -9,7 +9,13 @@ module ColonelKurtz
|
|
9
9
|
|
10
10
|
define_method "#{field}_blocks" do
|
11
11
|
begin
|
12
|
-
|
12
|
+
content = send(field)
|
13
|
+
|
14
|
+
if content.is_a?(String)
|
15
|
+
content = JSON.parse(content)
|
16
|
+
end
|
17
|
+
|
18
|
+
content.map { |data| ColonelKurtz::Block.new(data) }
|
13
19
|
rescue
|
14
20
|
[] # TODO error handling
|
15
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colonel_kurtz_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viget
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.2.2
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Ruby wrapper for Colonel Kurtz data
|