Class: PageMeta::OpenTag
- Inherits:
-
Object
- Object
- PageMeta::OpenTag
- Defined in:
- lib/page_meta/open_tag.rb
Instance Attribute Summary collapse
-
#attrs ⇒ Object
readonly
Returns the value of attribute attrs.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Class Method Summary collapse
Instance Method Summary collapse
- #helpers ⇒ Object
-
#initialize(tag, attrs) ⇒ OpenTag
constructor
A new instance of OpenTag.
- #render ⇒ Object
Constructor Details
#initialize(tag, attrs) ⇒ OpenTag
Returns a new instance of OpenTag.
11 12 13 14 |
# File 'lib/page_meta/open_tag.rb', line 11 def initialize(tag, attrs) @tag = tag @attrs = attrs end |
Instance Attribute Details
#attrs ⇒ Object (readonly)
Returns the value of attribute attrs.
9 10 11 |
# File 'lib/page_meta/open_tag.rb', line 9 def attrs @attrs end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
9 10 11 |
# File 'lib/page_meta/open_tag.rb', line 9 def tag @tag end |
Class Method Details
.build(tag, attrs) ⇒ Object
5 6 7 |
# File 'lib/page_meta/open_tag.rb', line 5 def self.build(tag, attrs) new(tag, attrs) end |
Instance Method Details
#helpers ⇒ Object
20 21 22 |
# File 'lib/page_meta/open_tag.rb', line 20 def helpers ActionController::Base.helpers end |
#render ⇒ Object
16 17 18 |
# File 'lib/page_meta/open_tag.rb', line 16 def render helpers.tag(tag, attrs) end |