Class: Sortable::Column

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, scope = nil, column: name, method: nil) ⇒ Column

Returns a new instance of Column.



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

def initialize(name, scope = nil, column: name, method: nil)
  @name = name
  @column = column
  @method = method
  @scope = scope
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



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

def column
  @column
end

#methodObject (readonly)

Returns the value of attribute method.



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

def method
  @method
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#scopeObject (readonly)

Returns the value of attribute scope.



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

def scope
  @scope
end