Module: Torque::PostgreSQL::Attributes::Period

Defined in:
lib/torque/postgresql/attributes/period.rb,
sig/torque/postgresql/attributes/period.rbs

Overview

For now, period doesn't have it's own class

Class Method Summary collapse

Class Method Details

.include_on(klass, method_name = nil) ⇒ Object

Provide a method on the given class to setup which period columns will be manually initialized

Parameters:

  • klass (model)
  • method_name (Symbol, nil) (defaults to: nil)

Returns:

  • (Object)


11
12
13
14
# File 'lib/torque/postgresql/attributes/period.rb', line 11

def include_on(klass, method_name = nil)
  method_name ||= PostgreSQL.config.period.base_method
  Builder.include_on(klass, method_name, Builder::Period)
end