Module: Weft::DSL::Attributes

Included in:
Component, Page
Defined in:
lib/weft/dsl/attributes.rb

Overview

Mixin for classes that declare wire-state attributes. Provides the attribute class DSL and attrs instance reader. Used by Component (for partial route params) and Page (for page route params).

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#attrsObject (readonly)

Instance access to resolved wire attribute values. Returns a Weft::Attributes object with method-style and hash access.



40
41
42
# File 'lib/weft/dsl/attributes.rb', line 40

def attrs
  @attrs
end

Class Method Details

.included(base) ⇒ Object



9
10
11
# File 'lib/weft/dsl/attributes.rb', line 9

def self.included(base)
  base.extend(ClassMethods)
end