Module: Treaty::Attribute::DSL

Included in:
Entity, Request::Entity, Response::Entity
Defined in:
lib/treaty/attribute/dsl.rb

Overview

DSL module for defining attributes in Entity-like classes.

This module provides the class-level DSL for defining attributes. It can be included in any class that needs attribute definition capabilities.

## Usage

“‘ruby class MyEntity

include Treaty::Attribute::DSL

string :name
integer :age

end “‘

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



21
22
23
# File 'lib/treaty/attribute/dsl.rb', line 21

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