ure 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/ure/version.rb +1 -1
- data/lib/ure.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2564d468cfb86fb5d089b916fb4f848f6e08365
|
4
|
+
data.tar.gz: 012018bf3ff59f6b2931997083a1ed6133efc0bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8e2fccf99d37a11d111390071b1ec933b3604ed6330cae2b34b62bdf8417139b4d03419fac4531188566175e95cd7604d6e5fae2f71ce8d5bad508253a763ba
|
7
|
+
data.tar.gz: 62e93a510b5253b021d2351411fbe9ed28b31413cc5abb0c8a00468ef59ddbdd16a970a855503ad58ccd6ba99aff3383a7e4dda0658b0be8bb499a1357807cf9
|
data/README.md
CHANGED
@@ -74,7 +74,7 @@ Ure will try to implement as public methods whatever keys you pass in as a hash.
|
|
74
74
|
|
75
75
|
Any methods on `Struct` that require indexing or care about the position of arguments have been depricated or changed to only care about the name of the argument passed.
|
76
76
|
|
77
|
-
Ure's current public methods are:
|
77
|
+
Ure's current public instance methods are:
|
78
78
|
|
79
79
|
`#==()` - Evaluates the fields. Returns true if the passed argument is an Ure class and they are the same members and values.
|
80
80
|
|
@@ -96,6 +96,8 @@ Ure's current public methods are:
|
|
96
96
|
|
97
97
|
`#values_at` - Takes one or more keys as arguments, and returns an array of the corresponding values.
|
98
98
|
|
99
|
+
`#class` - Returns `Ure`
|
100
|
+
|
99
101
|
## Development
|
100
102
|
|
101
103
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/ure/version.rb
CHANGED
data/lib/ure.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require "ure/version"
|
2
2
|
class Ure < BasicObject
|
3
3
|
include ::Enumerable
|
4
|
-
|
5
4
|
def self.members
|
6
5
|
@members
|
7
6
|
end
|
@@ -9,7 +8,6 @@ class Ure < BasicObject
|
|
9
8
|
def self.new(*members, &body)
|
10
9
|
::Class.new(self) do
|
11
10
|
instance_variable_set(:@members, members)
|
12
|
-
instance_variable_set(:@class, ::Ure.class)
|
13
11
|
|
14
12
|
def self.new(*args, &block)
|
15
13
|
object = allocate
|
@@ -44,6 +42,7 @@ class Ure < BasicObject
|
|
44
42
|
|
45
43
|
@values = fields
|
46
44
|
@fields = fields
|
45
|
+
@class = ::Ure
|
47
46
|
end
|
48
47
|
|
49
48
|
attr_reader :fields, :class
|