manhattan 0.0.1 → 0.0.2
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.
- data/lib/manhattan.rb +2 -0
- data/lib/manhattan/version.rb +1 -1
- data/spec/{mahattan_spec.rb → manhattan_spec.rb} +1 -1
- metadata +3 -3
data/lib/manhattan.rb
CHANGED
@@ -34,6 +34,7 @@ module Manhattan
|
|
34
34
|
query = "#{status}?".to_sym
|
35
35
|
negative_query = "not_#{query}".to_sym
|
36
36
|
alternative_negative_query = "un#{query}".to_sym
|
37
|
+
alternate_negative_query = "in#{query}".to_sym
|
37
38
|
|
38
39
|
define_method query do
|
39
40
|
self.status == self.class.status(status.to_sym)
|
@@ -43,6 +44,7 @@ module Manhattan
|
|
43
44
|
!self.send(query)
|
44
45
|
end
|
45
46
|
alias_method alternative_negative_query, negative_query
|
47
|
+
alias_method alternate_negative_query, negative_query
|
46
48
|
end
|
47
49
|
|
48
50
|
def define_mark_method(status)
|
data/lib/manhattan/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: manhattan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Alvaro Pereyra
|
@@ -26,7 +26,7 @@ files:
|
|
26
26
|
- lib/manhattan.rb
|
27
27
|
- lib/manhattan/version.rb
|
28
28
|
- manhattan.gemspec
|
29
|
-
- spec/
|
29
|
+
- spec/manhattan_spec.rb
|
30
30
|
- spec/mysterious_box.rb
|
31
31
|
- spec/spec_helper.rb
|
32
32
|
homepage: ''
|
@@ -55,6 +55,6 @@ specification_version: 3
|
|
55
55
|
summary: Extend your model with Manhattan, and enjoy a simple state machine and value
|
56
56
|
accessors and queries
|
57
57
|
test_files:
|
58
|
-
- spec/
|
58
|
+
- spec/manhattan_spec.rb
|
59
59
|
- spec/mysterious_box.rb
|
60
60
|
- spec/spec_helper.rb
|