class HtmlGrid::Link

Public Instance Methods

href() click to toggle source
# File lib/htmlgrid/link.rb, line 36
def href
  @attributes["href"]
end
href=(url) click to toggle source
# File lib/htmlgrid/link.rb, line 40
def href=(url)
  @attributes["href"] = url
end
init() click to toggle source
Calls superclass method
# File lib/htmlgrid/link.rb, line 31
def init
  super
  @value = @lookandfeel.lookup(@name)
end
target=(trg) click to toggle source
# File lib/htmlgrid/link.rb, line 44
def target=(trg)
  @attributes["target"]     = trg
end
to_html(context) click to toggle source
Calls superclass method
# File lib/htmlgrid/link.rb, line 48
def to_html(context)
  context.a(@attributes) {
    if @value.respond_to?(:to_html)
      @value.to_html(context).force_encoding("utf-8")
    else
      super
    end
  } << dynamic_html(context)
end