bbcode-rails 0.4.0 → 0.5.0

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: 21b47b5774aef0eddc17f7e9facc9e71755f5c1e
4
- data.tar.gz: 5112e0325ef559da75db8e1609f4cb4dac15cab8
3
+ metadata.gz: b5dee9f1d9bccc6961a4781397d3fff6efe259f0
4
+ data.tar.gz: 66cb0ca65f32e79335549cd45b0423a06b3ba233
5
5
  SHA512:
6
- metadata.gz: 18f71dbceb271c2e1c61e026054d28b046142a675a726c5d102054b492282f99854d0ebc7b5ba98fa661cc192ba988a164910eddabb8e4538cc02210a95dcccd
7
- data.tar.gz: e1a58106bc452f9bcc40d59a8f9b51198ac7b0ed4278d183e992c2055274b457f23f8b878ab9048556ccbb9e7f43fb56148a909f0bcf6c31e48b367f41a9d4ed
6
+ metadata.gz: e4a638216dea09abdb06a12cccc1a8951cf0b7cbd20110695f2bd13f7bfa46107c96fba736a1d7fcca8ae023313c20c56b4f1e615deb956ad7d1ec9cf74cf64e
7
+ data.tar.gz: aa7399efb0d104152b7008bbf12b724b63f765fd72f31f102c080629d285701470d35554e3fc0eada808b3018821966302354e67db3ce07f0078b459924edc6b
data/lib/bbcode-rails.rb CHANGED
@@ -16,7 +16,7 @@ module BBCode
16
16
  str.gsub!( "'", ''' )
17
17
 
18
18
  @@tags.each do |t|
19
- str.gsub!(t.regex) { t.new.instance_exec($~, &t.block) }
19
+ str.gsub!(t.regex) { t.instance.instance_exec($~, &t.block) }
20
20
  end
21
21
  str
22
22
  end
@@ -17,6 +17,9 @@ class BBCode::Tag
17
17
  self.view_paths = "app/views"
18
18
  end
19
19
 
20
+ def self.instance
21
+ @_tag ||= new
22
+ end
20
23
 
21
24
  def self.inherited subclass
22
25
  BBCode.tags << subclass
@@ -1,3 +1,3 @@
1
1
  module BBCode
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bbcode-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcel Müller