unstructured 0.1.1 → 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/lib/unstructured/object.rb +7 -0
- data/lib/unstructured/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04e91f2dee32fa32fbfc2907d12cd0489a6e9380ea0c7a93f61f3e27fe23be2f
|
4
|
+
data.tar.gz: f94417fd4bc69180c9eff4ec6cc38d82b74111ae4275cb5b1b04f1badccc4e44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e603eb1ea45a348ff0b5c3edcc4ef54e1894906a74d3359a0fc41a039448ed49a73493054ced67488e9f1f543bca54833c31ad46cbb49ba8dd424a56637b0b23
|
7
|
+
data.tar.gz: 66c72aba06d0bc640aade82cdb8b02835818a08cc57fe95b071f36573031b7184c16cfb98518c27d19d6858912fead04201f9acc52f9a5e15e6c2c971f96f92f
|
data/lib/unstructured/object.rb
CHANGED
@@ -3,7 +3,10 @@
|
|
3
3
|
require "ostruct"
|
4
4
|
module Unstructured
|
5
5
|
class Object
|
6
|
+
attr_reader :attributes, :raw_data
|
7
|
+
|
6
8
|
def initialize(attributes)
|
9
|
+
@raw_data = attributes
|
7
10
|
@attributes = OpenStruct.new(attributes)
|
8
11
|
end
|
9
12
|
|
@@ -16,5 +19,9 @@ module Unstructured
|
|
16
19
|
def respond_to_missing?(_method, _include_private = false)
|
17
20
|
true
|
18
21
|
end
|
22
|
+
|
23
|
+
def to_h
|
24
|
+
@raw_data
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
data/lib/unstructured/version.rb
CHANGED