Class: FlexibleSorting::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/flexible_sorting.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, scope = nil, column: name, virtual: false, as_instance_method: false) ⇒ Column

Returns a new instance of Column.



23
24
25
26
27
28
29
# File 'lib/flexible_sorting.rb', line 23

def initialize(name, scope = nil, column: name, virtual: false, as_instance_method: false)
  @name = name
  @column = column
  @scope = scope
  @virtual = virtual
  @as_instance_method = as_instance_method
end

Instance Attribute Details

#as_instance_methodObject (readonly)

Returns the value of attribute as_instance_method.



22
23
24
# File 'lib/flexible_sorting.rb', line 22

def as_instance_method
  @as_instance_method
end

#columnObject (readonly)

Returns the value of attribute column.



22
23
24
# File 'lib/flexible_sorting.rb', line 22

def column
  @column
end

#method_argsObject (readonly)

Returns the value of attribute method_args.



22
23
24
# File 'lib/flexible_sorting.rb', line 22

def method_args
  @method_args
end

#nameObject (readonly)

Returns the value of attribute name.



22
23
24
# File 'lib/flexible_sorting.rb', line 22

def name
  @name
end

#scopeObject (readonly)

Returns the value of attribute scope.



22
23
24
# File 'lib/flexible_sorting.rb', line 22

def scope
  @scope
end

#virtualObject (readonly)

Returns the value of attribute virtual.



22
23
24
# File 'lib/flexible_sorting.rb', line 22

def virtual
  @virtual
end