class Tagz::Namespace::Document

Public Class Methods

for(other) click to toggle source
# File lib/tagz.rb, line 246
def Document.for(other)
  Document === other ? other : Document.new(other.to_s)
end

Public Instance Methods

+(other) click to toggle source
# File lib/tagz.rb, line 290
def + other
  self.dup << other
end
<<(obj) click to toggle source
Calls superclass method
# File lib/tagz.rb, line 258
def << obj
  if obj.respond_to?(:html_safe?) and obj.html_safe?
    super obj.to_s
  else
    super Tagz.escape_content(obj)
  end

  self
end
concat(obj) click to toggle source
# File lib/tagz.rb, line 268
def concat(obj)
  self << obj
end
Also aliased as: write, push
doc()
Alias for: document
document() click to toggle source
# File lib/tagz.rb, line 285
def document
  self
end
Also aliased as: doc
e()
Alias for: element
element() click to toggle source
# File lib/tagz.rb, line 250
def element
  Tagz.element.new(*a, &b)
end
Also aliased as: e
escape(string) click to toggle source
# File lib/tagz.rb, line 272
def escape(string)
  Tagz.escape(string)
end
Also aliased as: h
h(string)
Alias for: escape
push(obj)
Alias for: concat
puts(string) click to toggle source
# File lib/tagz.rb, line 277
def puts(string)
  write "#{ string }\n"
end
raw(string) click to toggle source
# File lib/tagz.rb, line 281
def raw(string)
  push Document.for(string)
end
to_s() click to toggle source
# File lib/tagz.rb, line 294
def to_s
  self
end
to_str() click to toggle source
# File lib/tagz.rb, line 298
def to_str
  self
end
write(obj)
Alias for: concat