Module: Fortitude::Widget::Doctypes
- Extended by:
- ActiveSupport::Concern
- Included in:
- Fortitude::Widget
- Defined in:
- lib/fortitude/widget/doctypes.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#doctype(s) ⇒ Object
PUBLIC API.
-
#doctype! ⇒ Object
PUBLIC API.
Instance Method Details
#doctype(s) ⇒ Object
PUBLIC API
10 11 12 |
# File 'lib/fortitude/widget/doctypes.rb', line 10 def doctype(s) tag_rawtext "<!DOCTYPE #{s}>" end |
#doctype! ⇒ Object
PUBLIC API
15 16 17 18 19 |
# File 'lib/fortitude/widget/doctypes.rb', line 15 def doctype! dt = self.class.doctype raise "You must set a doctype at the class level, using something like 'doctype :html5', before you can use this method." unless dt dt.declare!(self) end |