enum_attr 0.0.3 → 0.0.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/enum_attr.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{enum_attr}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["qichunren"]
@@ -24,7 +24,8 @@ Gem::Specification.new do |s|
24
24
  "VERSION",
25
25
  "enum_attr.gemspec",
26
26
  "init.rb",
27
- "lib/enum_attr.rb"
27
+ "lib/enum_attr.rb",
28
+ "rails/init.rb"
28
29
  ]
29
30
  s.homepage = %q{https://github.com/qichunren/enum_attr}
30
31
  s.rdoc_options = ["--charset=UTF-8"]
data/lib/enum_attr.rb CHANGED
@@ -34,7 +34,7 @@ module EnumAttr
34
34
  scope "#{attr}_#{enum[2]}".to_sym, where("#{attr}=#{enum[1]}")
35
35
 
36
36
  # TODO define_method such as "stauts_origin?"
37
- define_method "#{attr}_#{enum}?" do
37
+ define_method "#{attr}_#{enum[2]}?" do
38
38
  attr == enum[1]
39
39
  end
40
40
 
data/rails/init.rb ADDED
@@ -0,0 +1 @@
1
+ require "enum_attr"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - qichunren
@@ -36,6 +36,7 @@ files:
36
36
  - enum_attr.gemspec
37
37
  - init.rb
38
38
  - lib/enum_attr.rb
39
+ - rails/init.rb
39
40
  has_rdoc: true
40
41
  homepage: https://github.com/qichunren/enum_attr
41
42
  licenses: []