Module: Dry::Controller::ClassMethods

Defined in:
lib/dry/controller.rb

Instance Method Summary collapse

Instance Method Details

#dry_attrs_options(**options) ⇒ Object



37
38
39
# File 'lib/dry/controller.rb', line 37

def dry_attrs_options **options
  self._dry_attrs[:options] = options
end

#dry_attrs_read(*attrs) ⇒ Object



29
30
31
# File 'lib/dry/controller.rb', line 29

def dry_attrs_read *attrs
  self._dry_attrs[:read] = attrs
end

#dry_attrs_write(*attrs) ⇒ Object



33
34
35
# File 'lib/dry/controller.rb', line 33

def dry_attrs_write *attrs
  self._dry_attrs[:write] = attrs
end

#dry_nest(*relations) ⇒ Object



41
42
43
# File 'lib/dry/controller.rb', line 41

def dry_nest *relations
  self._dry_nested_relations.push *relations
end

#dry_scope(&block) ⇒ Object



25
26
27
# File 'lib/dry/controller.rb', line 25

def dry_scope &block
  self._dry_scope = block
end