Class: Sinatra::Exstatic::Tag
- Inherits:
-
String
- Object
- String
- Sinatra::Exstatic::Tag
- Defined in:
- lib/sinatra/exstatic_assets.rb
Overview
For creating HTML tags.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(name, options = {}, &block) ⇒ Tag
constructor
A new instance of Tag.
Constructor Details
#initialize(name, options = {}, &block) ⇒ Tag
Returns a new instance of Tag.
19 20 21 22 23 24 25 26 |
# File 'lib/sinatra/exstatic_assets.rb', line 19 def initialize( name, ={}, &block ) @name = name @closed = (c = .delete(:closed)).nil? ? true : c @options = @attributes = self.class.make_attributes @options @block = block super tag end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
28 29 30 |
# File 'lib/sinatra/exstatic_assets.rb', line 28 def attributes @attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
28 29 30 |
# File 'lib/sinatra/exstatic_assets.rb', line 28 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
28 29 30 |
# File 'lib/sinatra/exstatic_assets.rb', line 28 def @options end |