Sha256: ed9f8412ada2be7efa48247d05595b9a1d7c827f96961388e3cf0cf8d1772ddc
Contents?: true
Size: 1.03 KB
Versions: 10
Compression:
Stored size: 1.03 KB
Contents
module ExpressTemplates module Components # Configurable components support configuration options supplied to the # builder method. Supported options must be declared. All other options # are passed along and converted to html attributes. # # Example: # # ```ruby # # class Pane < ExpressTemplates::Components::Configurable # has_option :title, "Displayed in the title area", required: true # has_option :status, "Displayed in the status area" # end # # # Usage: # # pane(title: "People", status: "#{people.count} people") # # ```ruby # # Options specified as required must be supplied. # # Default values may be supplied for options with a default: keyword. # The value may be a proc. Useful for instances where you want a different # value every time. # # Options may be passed as html attributes with attribute: true # class Configurable < Base abstract_component include Capabilities::Configurable end end end
Version data entries
10 entries across 10 versions & 1 rubygems