Module: EasyTalk::Schema::InstanceMethods

Includes:
EasyTalk::SchemaBase::InstanceMethods
Defined in:
lib/easy_talk/schema.rb

Overview

Instance methods for schema-only models.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EasyTalk::SchemaBase::InstanceMethods

Instance Method Details

#==(other) ⇒ Object Originally defined in module EasyTalk::SchemaBase::InstanceMethods

#as_json(_options = {}) ⇒ Object Originally defined in module EasyTalk::SchemaBase::InstanceMethods

#initialize(attributes = {}) ⇒ Object

Initialize the schema object with attributes. Performs manual attribute assignment (no ActiveModel) then applies defaults and nested model instantiation via the shared base.

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to set



59
60
61
62
63
64
65
# File 'lib/easy_talk/schema.rb', line 59

def initialize(attributes = {})
  @additional_properties = {}
  provided_keys = Set.new

  assign_schema_attributes(attributes, provided_keys)
  initialize_schema_properties(provided_keys)
end

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean Originally defined in module EasyTalk::SchemaBase::InstanceMethods

Returns:

  • (Boolean)

#to_hObject Originally defined in module EasyTalk::SchemaBase::InstanceMethods

#to_hashObject Originally defined in module EasyTalk::SchemaBase::InstanceMethods