nagare 1.0.0 → 1.1.0
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/lib/nagare.rb +10 -2
- 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: 24f1510eda49b369d6c69f24e33d9a3cb11914c8
|
|
4
|
+
data.tar.gz: 5eafbf348527c7d8d8e8df21821d58c92c314d73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: af2d197321acf3cf9131ab3bb334cda0c3ec7475ecc843c2f9fa6ccbb8e2c29bb3166c5230377f0ede1ad999f647449cd9888644b972dc1d91dcb92e35570ea9
|
|
7
|
+
data.tar.gz: 4b8859febe2b2827fb8ecc703cd39ce20e6c9a4933b4f805e3a6b5554da17f8a3a5813fa2195ad9add4eb28786aa73f9bbad3b3674c4467f662b3ea805c8e358
|
data/lib/nagare.rb
CHANGED
|
@@ -21,6 +21,12 @@ module Nagare
|
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
def self.inherited(base)
|
|
25
|
+
base.instance_variable_set(:@attributes, @attributes.dup) if @attributes
|
|
26
|
+
|
|
27
|
+
super
|
|
28
|
+
end
|
|
29
|
+
|
|
24
30
|
def initialize(object, context)
|
|
25
31
|
@object = object
|
|
26
32
|
@context = context
|
|
@@ -117,6 +123,10 @@ module Nagare
|
|
|
117
123
|
Context.new(@attributes.merge(attributes))
|
|
118
124
|
end
|
|
119
125
|
|
|
126
|
+
def [](key)
|
|
127
|
+
@attributes[key]
|
|
128
|
+
end
|
|
129
|
+
|
|
120
130
|
def respond_to?(key, private_methods = false)
|
|
121
131
|
@attributes.has_key?(key) || super
|
|
122
132
|
end
|
|
@@ -124,8 +134,6 @@ module Nagare
|
|
|
124
134
|
def method_missing(method)
|
|
125
135
|
if @attributes.has_key?(method)
|
|
126
136
|
@attributes.fetch(method)
|
|
127
|
-
else
|
|
128
|
-
super
|
|
129
137
|
end
|
|
130
138
|
end
|
|
131
139
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nagare
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Oestrich
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|