Module: Plushie::DSL::Buildable Private
- Defined in:
- lib/plushie/dsl/buildable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Behaviour for types that participate in the DSL block-form pattern.
Types that include this module can be constructed from keyword options inside DSL do-blocks:
container "box" do border do # <- Buildable: Border.from_opts called with color "#333" # collected keyword pairs width 2 end end
Implementing types must define:
self.from_opts(hash)- construct from keyword hashself.field_keys- array of valid field name symbolsself.field_types- hash of field name -> nested type module (for recursive do-blocks)
Currently implemented by: Padding, Border, Shadow, Font, StyleMap, A11y
Defined Under Namespace
Modules: ClassMethods