class DisplayFor::Builder::Base
Attributes
html_options[R]
namespace[R]
resource_class[R]
template[R]
Public Class Methods
new(html_options, template, &block)
click to toggle source
# File lib/display_for/builder/base.rb, line 8 def initialize(html_options, template, &block) @template = template @attributes = [] @actions = [] @html_options = html_options block.call(self) if block_given? end
Public Instance Methods
action(name, options = {}, &block)
click to toggle source
# File lib/display_for/builder/base.rb, line 21 def action(name, options = {}, &block) @actions << Element::Action.new(self, name, options, &block) end
attribute(name, options = {}, &block)
click to toggle source
# File lib/display_for/builder/base.rb, line 17 def attribute(name, options = {}, &block) @attributes << Element::Attribute.new(self, name, options, &block) end
html(name, options = {}, &block)
click to toggle source
# File lib/display_for/builder/base.rb, line 25 def html(name, options = {}, &block) @attributes << Element::Html.new(self, name, options, &block) end