Class: Hoshi::View::HTML

Inherits:
Hoshi::View show all
Defined in:
lib/hoshi/view/html.rb

Direct Known Subclasses

HTML3, HTML4, HTML5, XHTML

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Hoshi::View

[], #_tag, #append!, build, #clear!, #comment, #doc, #doctype, dtd!, #entity, #initialize, #method_missing, open_tags, permissive!, permissive?, #raw, #render, #render_cgi, #safe, self_closing_tags, strict!, strict?, tag, #tag, tags

Constructor Details

This class inherits a constructor from Hoshi::View

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Hoshi::View

Class Method Details

.content_typeObject



8
9
10
# File 'lib/hoshi/view/html.rb', line 8

def self.content_type
	'text/html'
end

Instance Method Details

#cdata(str) ⇒ Object



12
13
14
# File 'lib/hoshi/view/html.rb', line 12

def cdata str
	append! "<![CDATA[\n" + str + "\n]]>"
end

#css_includes(*ss) ⇒ Object

Includes the stylesheets from the list passed as arguments.



17
18
19
20
21
# File 'lib/hoshi/view/html.rb', line 17

def css_includes *ss
	ss.each { |s|
		link :rel => 'stylesheet', :media => 'all', :href => s
	}
end