Class: Funicular::Model

Inherits:
Object
  • Object
show all
Extended by:
Validations::ClassMethods
Includes:
Validations
Defined in:
sig/model.rbs,
sig/validations.rbs

Defined Under Namespace

Modules: Validations Classes: Errors

Constant Summary

Constants included from Validations::ClassMethods

Validations::ClassMethods::SHARED_OPTIONS

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Validations::ClassMethods

add_schema_validator, symbolize_keys, validates, validator_class_for, validators, validators_on

Methods included from Validations

#errors, included, #invalid?, #read_attribute_for_validation, #valid?

Constructor Details

#initializeModel

Returns a new instance of Model.

Parameters:

  • attributes (Hash[untyped, untyped])


14
# File 'sig/model.rbs', line 14

def initialize: (?Hash[untyped, untyped] attributes) -> void

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.

Returns:

  • (Object)


6
7
8
# File 'sig/model.rbs', line 6

def id
  @id
end

Class Method Details

.allvoid

This method returns an undefined value.

Parameters:

  • params (Hash[untyped, untyped])


19
# File 'sig/model.rbs', line 19

def self.all: (?Hash[untyped, untyped] params) ?{ (Array[Model]? instances, String? error) -> void } -> void

.createvoid

This method returns an undefined value.

Parameters:

  • attrs (Hash[untyped, untyped])
  • model_class: (singleton(Model))


21
# File 'sig/model.rbs', line 21

def self.create: (Hash[untyped, untyped] attrs, ?model_class: singleton(Model)) ?{ (Model? instance, untyped error) -> void } -> void

.destroyvoid

This method returns an undefined value.

Parameters:

  • id (Object)


22
# File 'sig/model.rbs', line 22

def self.destroy: (?untyped id) ?{ (bool success, untyped result) -> void } -> void

.endpointsHash[String, Hash[String, String]]

Returns:

  • (Hash[String, Hash[String, String]])


11
# File 'sig/model.rbs', line 11

def self.endpoints: () -> Hash[String, Hash[String, String]]

.endpoints=Hash[String, Hash[String, String]]

Parameters:

  • endpoints (Hash[String, Hash[String, String]])

Returns:

  • (Hash[String, Hash[String, String]])


12
# File 'sig/model.rbs', line 12

def self.endpoints=: (Hash[String, Hash[String, String]] endpoints) -> Hash[String, Hash[String, String]]

.findvoid

This method returns an undefined value.

Parameters:

  • id (Object)
  • endpoint_name: (String)
  • model_class: (singleton(Model))


20
# File 'sig/model.rbs', line 20

def self.find: (?untyped id, ?endpoint_name: String, ?model_class: singleton(Model)) ?{ (Model? instance, String? error) -> void } -> void

.load_schemavoid

This method returns an undefined value.

Parameters:

  • schema_data (Hash[String, untyped])


15
# File 'sig/model.rbs', line 15

def self.load_schema: (Hash[String, untyped] schema_data) -> void

.normalize_validation_optionsObject

Parameters:

  • kind (Symbol, String)
  • opts (Object)

Returns:

  • (Object)


17
# File 'sig/model.rbs', line 17

def self.normalize_validation_options: (Symbol | String kind, untyped opts) -> untyped

.register_schema_validationsvoid

This method returns an undefined value.

Parameters:

  • validations (Object)


16
# File 'sig/model.rbs', line 16

def self.register_schema_validations: (untyped validations) -> void

.schemaHash[String, Hash[String, untyped]]

Returns:

  • (Hash[String, Hash[String, untyped]])


9
# File 'sig/model.rbs', line 9

def self.schema: () -> Hash[String, Hash[String, untyped]]

.schema=Hash[String, Hash[String, untyped]]

Parameters:

  • schema (Hash[String, Hash[String, untyped]])

Returns:

  • (Hash[String, Hash[String, untyped]])


10
# File 'sig/model.rbs', line 10

def self.schema=: (Hash[String, Hash[String, untyped]] schema) -> Hash[String, Hash[String, untyped]]

Instance Method Details

#destroyvoid

This method returns an undefined value.



25
# File 'sig/model.rbs', line 25

def destroy: () ?{ (bool success, untyped result) -> void } -> void

#reloadvoid

This method returns an undefined value.



26
# File 'sig/model.rbs', line 26

def reload: () ?{ (Model? instance, String? error) -> void } -> void

#updatevoid

This method returns an undefined value.

Parameters:

  • attrs (Hash[untyped, untyped], nil)


24
# File 'sig/model.rbs', line 24

def update: (?Hash[untyped, untyped]? attrs) ?{ (bool success, untyped result) -> void } -> void