Class: TypicalSort::SortDefinition

Inherits:
Struct
  • Object
show all
Defined in:
lib/typical_sort/sort_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aggregateObject

Returns the value of attribute aggregate

Returns:

  • (Object)

    the current value of aggregate



4
5
6
# File 'lib/typical_sort/sort_definition.rb', line 4

def aggregate
  @aggregate
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



4
5
6
# File 'lib/typical_sort/sort_definition.rb', line 4

def name
  @name
end

#nullsObject

Returns the value of attribute nulls

Returns:

  • (Object)

    the current value of nulls



4
5
6
# File 'lib/typical_sort/sort_definition.rb', line 4

def nulls
  @nulls
end

#scopeObject

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



4
5
6
# File 'lib/typical_sort/sort_definition.rb', line 4

def scope
  @scope
end

Instance Method Details

#aggregate?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/typical_sort/sort_definition.rb', line 9

def aggregate?
  !aggregate.nil?
end

#keyObject



5
6
7
# File 'lib/typical_sort/sort_definition.rb', line 5

def key
  name.to_s
end

#scope?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/typical_sort/sort_definition.rb', line 13

def scope?
  scope == true
end