Class: Aureus::Renderable

Inherits:
Object
  • Object
show all
Includes:
ActionView::Context, ActionView::Helpers::CaptureHelper, ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper, Haml::Helpers
Defined in:
lib/aureus.rb

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ Renderable

Returns a new instance of Renderable.



29
30
31
# File 'lib/aureus.rb', line 29

def initialize content
	@content = content
end

Instance Method Details

#compact(*args) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/aureus.rb', line 41

def compact *args
	out = String.new.html_safe
	args.each do |i|
		out += i
	end
	out
end

#compact_render(*args) ⇒ Object



49
50
51
52
53
54
55
# File 'lib/aureus.rb', line 49

def compact_render *args
	out = String.new.html_safe
	args.each do |i|
		out += i.render
	end
	out
end

#content_tag(name, content_or_options_with_block = nil, options = nil, escape = false, &block) ⇒ Object



37
38
39
# File 'lib/aureus.rb', line 37

def  name, content_or_options_with_block = nil, options = nil, escape = false, &block
	super name, content_or_options_with_block, options, escape, &block
end

#init(args, *defaults) ⇒ Object



33
34
35
# File 'lib/aureus.rb', line 33

def init args, *defaults
	@options = defaults.extract_options!.merge args.extract_options!
end

#renderObject



57
58
59
# File 'lib/aureus.rb', line 57

def render
	@content
end