baozhao_gem 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/README.md CHANGED
@@ -27,3 +27,4 @@ TODO: Write usage instructions here
27
27
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
28
  4. Push to the branch (`git push origin my-new-feature`)
29
29
  5. Create new Pull Request
30
+ bz_gem
@@ -1,3 +1,3 @@
1
1
  module BaozhaoGem
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/baozhao_gem.rb CHANGED
@@ -1,5 +1,19 @@
1
1
  require "baozhao_gem/version"
2
2
 
3
3
  module BaozhaoGem
4
- # Your code goes here...
4
+ def self.included(base)
5
+ base.extend(ClassMethods)
6
+ end
7
+
8
+ module ClassMethods
9
+ def baozhao_gem
10
+ include RenameUrl::InstanceMethods
11
+ end
12
+ end
13
+
14
+ module InstanceMethods
15
+ def to_param
16
+ "#{id}_#{title}"
17
+ end
18
+ end
5
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baozhao_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: