bb_openstruct 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -1
- data/bb_openstruct.gemspec +1 -1
- data/lib/bb_openstruct/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: 1b43f1d5d00ac5506d1d34420f006023f9ad3006
|
4
|
+
data.tar.gz: d7504ba37b766fe432880ca0ecad34d3c804e6c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fb539252d0e6e46e62d660431b453e01b5ee93f72873f2a2a643f8fe1293b7494b098db0a7f44fe4c6b5ff03f44abdb7fcece6f5b92578e1b35d4f43afb8d3b
|
7
|
+
data.tar.gz: fef765b4b95997c2aef8de5fa2a41250284d4fbbfb86e578ec23ab18ebe2b9fe067b62d9ce379c0f6e14556c85cb2574e6b268853f3608ce29cf071a8c6d4914
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# BBOpenstruct
|
2
2
|
|
3
|
-
This gem contains
|
3
|
+
This gem contains BBOpenStruct (Binding-based openstruct) class - reimplementation of OpenStruct that uses binding to store your data internally. Why? For science. You monster.
|
4
4
|
|
5
5
|
Test file is actually taken from original openstruct implementation, so API is nearly identical.
|
6
6
|
|
@@ -20,6 +20,17 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
$ gem install bb_openstruct
|
22
22
|
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Use it like your normal OpenStruct:
|
26
|
+
|
27
|
+
require 'bb_openstruct'
|
28
|
+
bb = BBOpenStruct.new(a: 1)
|
29
|
+
bb.a # => 1
|
30
|
+
bb[:a] # => 1
|
31
|
+
bb.new_var = 20
|
32
|
+
bb.new_var # => 20
|
33
|
+
|
23
34
|
## Should I use it on production
|
24
35
|
|
25
36
|
Well... I don't really know what can go wrong, however I'm not sure it's very good idea.
|
data/bb_openstruct.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["p.szmielew@ava.waw.pl"]
|
11
11
|
|
12
12
|
spec.summary = %q{Reimplementation of OpenStruct that uses binding object as data store}
|
13
|
-
spec.homepage = "
|
13
|
+
spec.homepage = "https://github.com/esse/bb_openstruct"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb_openstruct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Szmielew
|
@@ -56,7 +56,7 @@ files:
|
|
56
56
|
- bin/setup
|
57
57
|
- lib/bb_openstruct.rb
|
58
58
|
- lib/bb_openstruct/version.rb
|
59
|
-
homepage:
|
59
|
+
homepage: https://github.com/esse/bb_openstruct
|
60
60
|
licenses:
|
61
61
|
- MIT
|
62
62
|
metadata: {}
|