Class: ParamsReady::Ordering::OrderingParameterBuilder

Inherits:
Builder show all
Defined in:
lib/params_ready/ordering/ordering.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Builder

#helper

Methods inherited from AbstractBuilder

#build, builder, define_parameter, define_registered_parameter, #fetch, fetch_builder, #include, #initialize, #open?, register, register_deprecated, resolve

Methods included from Extensions::Registry

#human_string, #registry

Constructor Details

This class inherits a constructor from ParamsReady::AbstractBuilder

Class Method Details

.instanceObject



132
133
134
# File 'lib/params_ready/ordering/ordering.rb', line 132

def self.instance
  new OrderingParameterDefinition.new({})
end

Instance Method Details

#column(name, ordering, arel_table: nil, expression: nil, nulls: :default, required: false, pk: false) ⇒ Object



136
137
138
139
140
141
142
143
144
145
146
# File 'lib/params_ready/ordering/ordering.rb', line 136

def column(name, ordering, arel_table: nil, expression: nil, nulls: :default, required: false, pk: false)
  @definition.add_column(
    name,
    ordering,
    arel_table: arel_table,
    expression: expression,
    nulls: nulls,
    required: required,
    pk: pk
  )
end

#default(*array) ⇒ Object



148
149
150
# File 'lib/params_ready/ordering/ordering.rb', line 148

def default(*array)
  super array
end