Module: Treaty::Entity::Attribute::DSL

Included in:
Action::Request::Entity, Action::Response::Entity, Base
Defined in:
lib/treaty/entity/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

class MyEntity
  include Treaty::Entity::Attribute::DSL

  string :name
  integer :age
end

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



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

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