state_attr 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/state_attr/state.rb +4 -0
- data/lib/state_attr.rb +1 -3
- data/state_attr.gemspec +1 -1
- metadata +3 -3
data/lib/state_attr/state.rb
CHANGED
@@ -16,12 +16,16 @@ module StateAttr
|
|
16
16
|
def to_s
|
17
17
|
read_state.to_s
|
18
18
|
end
|
19
|
+
deif to_yaml( *opts )
|
20
|
+
to_s.to_yaml( *opts )
|
21
|
+
end
|
19
22
|
|
20
23
|
# current state value
|
21
24
|
def value
|
22
25
|
read_state
|
23
26
|
end
|
24
27
|
alias_method :current, :value
|
28
|
+
alias_method :to_sym, :value
|
25
29
|
|
26
30
|
# validates if state is one of the given states
|
27
31
|
def is?(*symbols)
|
data/lib/state_attr.rb
CHANGED
data/state_attr.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: state_attr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 11
|
10
|
+
version: 0.1.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michal Papis
|