Module: Origin::Extensions::Symbol

Defined in:
lib/origin/extensions/symbol.rb

Overview

This module contains additional symbol behaviour.

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

- (Hash) __expr_part__(value, negating = false)

Get the symbol as a specification.

Examples:

Get the symbol as a criteria.

:field.__expr_part__(value)

Since:

  • 1.0.0



19
20
21
# File 'lib/origin/extensions/symbol.rb', line 19

def __expr_part__(value, negating = false)
  ::String.__expr_part__(self, value, negating)
end

- (Integer) to_direction

Get the symbol as a sort direction.

Examples:

Get the symbol as a sort direction.

"1".to_direction

Since:

  • 1.0.0



31
32
33
# File 'lib/origin/extensions/symbol.rb', line 31

def to_direction
  to_s.to_direction
end