metamagic 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/metamagic.rb +4 -0
- data/lib/metamagic/helper_methods.rb +21 -0
- metadata +63 -0
data/lib/metamagic.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Metamagic
|
2
|
+
module HelperMethods
|
3
|
+
def meta(options = {})
|
4
|
+
@meta_tags = options
|
5
|
+
end
|
6
|
+
|
7
|
+
def metamagic(options = {})
|
8
|
+
options = @meta_tags || options
|
9
|
+
|
10
|
+
out = ''
|
11
|
+
options.each do |key, value|
|
12
|
+
if value.is_a?(Array)
|
13
|
+
value = value.join(", ")
|
14
|
+
end
|
15
|
+
out += tag('meta', :name => key.to_s, :content => value) if value
|
16
|
+
end
|
17
|
+
|
18
|
+
out.html_safe
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: metamagic
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 1
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
version: 1.0.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Lasse Bunk
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-09-25 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Metamagic is a simple Ruby on Rails plugin for creating meta tags.
|
22
|
+
email: lassebunk@gmail.com
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
29
|
+
files:
|
30
|
+
- lib/metamagic/helper_methods.rb
|
31
|
+
- lib/metamagic.rb
|
32
|
+
has_rdoc: true
|
33
|
+
homepage: http://github.com/lassebunk/metamagic
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options: []
|
38
|
+
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
segments:
|
53
|
+
- 0
|
54
|
+
version: "0"
|
55
|
+
requirements: []
|
56
|
+
|
57
|
+
rubyforge_project:
|
58
|
+
rubygems_version: 1.3.6
|
59
|
+
signing_key:
|
60
|
+
specification_version: 3
|
61
|
+
summary: Simple Ruby on Rails plugin for creating meta tags.
|
62
|
+
test_files: []
|
63
|
+
|