acts_as_metable 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09a0163d1512591eadf2fc9b9fdb8608ec284d9a
4
- data.tar.gz: 54b90a2481fb9c15318eee02883d1419d731644b
3
+ metadata.gz: f84b54d521eaa01f369fce7f7aa3e45538d5cf8a
4
+ data.tar.gz: b0f1a922cc91c2508f02fad1b38d9a6680f79097
5
5
  SHA512:
6
- metadata.gz: fa39d7b2b0d720f5b09e2461a83fd13511fc95565d88ecdeefd1dd6a96fd4af74b74e10947a09755a6e200dbd191b89b2a620e54c1b68745ee8e0d08329b8e34
7
- data.tar.gz: 58ce21b856b9e36c00d9441f6a49a410fdcfeaef4562912e03868148c97c1a615844cf330773edb41531fea4f4dab1837d3734ea2c75c28977f2667ba069eaeb
6
+ metadata.gz: 54a3d51a21126d7d571ff25769b98aeb05558321421f621bcb10b89f63498b022e7edce78f14f37a0ee981edeb31465b6f54067fd5f180f0cbb499fe090c0d13
7
+ data.tar.gz: 28a7e993b5200bd82e0ccebec35c9d35b4f4e5cf8b1383589be60386c381b4c74b15855e42151fe4f795cab93e9ec3df51dac169de33abb24e571b1ea5ea7d8b
@@ -5,8 +5,16 @@ module ActsAsMetable
5
5
  @tags = []
6
6
 
7
7
  class << self
8
+ def tags &block
9
+ instance_eval &block
10
+ end
11
+
8
12
  def add_tag name, content
9
- @tags << { :name => name, :content => content }
13
+ @tags << { :name => name.to_s, :content => content }
14
+ end
15
+
16
+ def remove_tag name
17
+ @tags.delete_if { |tag| tag[:name] == name.to_s }
10
18
  end
11
19
 
12
20
  def add_model model_name, id
@@ -1,3 +1,3 @@
1
1
  module ActsAsMetable
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_metable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Novikov