class HtmlGrid::Image

Public Instance Methods

init() click to toggle source
Calls superclass method
# File lib/htmlgrid/image.rb, line 31
def init
  super
  if @lookandfeel
    @attributes["src"] = @lookandfeel.resource(@name)
    @attributes["alt"] = @lookandfeel.lookup(@name)
  end
  # @attributes['border'] = "0"
end
to_html(context) click to toggle source
# File lib/htmlgrid/image.rb, line 40
def to_html(context)
  context.img(@attributes)
end