Module: TinyDyno::DocumentComposition

Extended by:
ActiveSupport::Concern
Includes:
Attributes, Changeable, Expected, Fields, HashKey, Persistable, Stateful, Tables
Included in:
Document
Defined in:
lib/tiny_dyno/document_composition.rb

Constant Summary collapse

MODULES =
[
    Attributes,
    Expected,
    Changeable,
    Fields,
    HashKey,
    Persistable,
    Stateful,
    Tables,
]

Instance Attribute Summary

Attributes included from Stateful

#destroyed, #flagged_for_destroy, #new_record

Attributes included from Attributes

#attributes

Class Method Summary collapse

Methods included from Stateful

#destroyed?, #flagged_for_destroy?, #new_record?, #persisted?, #readonly?, #settable?, #updateable?

Methods included from Persistable

#save

Methods included from HashKey

#keys_as_selector

Methods included from Fields

#database_field_name, option, options

Methods included from Changeable

#changes

Methods included from Expected

#request_as_new_record

Methods included from Attributes

#attribute_missing?, #process_attribute, #process_attributes, #read_attribute, #typed_value_for, #write_attribute

Methods included from Attributes::Readonly

#attribute_writable?

Class Method Details

.prohibited_methodsArray<Symbol>

Get a list of methods that would be a bad idea to define as field names or override when including TinyDyno::Document.

Examples:

Bad thing!

TinyDyno::Components.prohibited_methods

Returns:

  • (Array<Symbol>)


43
44
45
46
47
# File 'lib/tiny_dyno/document_composition.rb', line 43

def prohibited_methods
  @prohibited_methods ||= MODULES.flat_map do |mod|
    mod.instance_methods.map(&:to_sym)
  end
end