Class: Merb::Controller
- Inherits:
-
Object
- Object
- Merb::Controller
- Defined in:
- lib/merb_meta.rb
Class Method Summary collapse
-
.inherited(klass) ⇒ Object
Default any subclasses meta tags to that of the parent.
-
.meta(tags = nil) ⇒ Object
Setter/Getter for meta Tags.
- .orig_inherited ⇒ Object
Instance Method Summary collapse
-
#meta(tags = nil) ⇒ Object
Getter/Setter for a controller instance’s meta tags.
Class Method Details
.inherited(klass) ⇒ Object
Default any subclasses meta tags to that of the parent
8 9 10 11 |
# File 'lib/merb_meta.rb', line 8 def inherited(klass) orig_inherited(klass) klass.(self.) end |
.meta(tags = nil) ⇒ Object
Setter/Getter for meta Tags
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/merb_meta.rb', line 21 def ( = nil) ||={} if .is_a? Hash .merge!() elsif .is_a? Symbol return [] end end |
.orig_inherited ⇒ Object
6 |
# File 'lib/merb_meta.rb', line 6 alias :orig_inherited :inherited |
Instance Method Details
#meta(tags = nil) ⇒ Object
Getter/Setter for a controller instance’s meta tags
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/merb_meta.rb', line 44 def ( = nil) ||= self.class..clone if .is_a? Hash .merge!() elsif .is_a? Symbol return [] else end end |