Method: Strings::Truncation::Configuration#position

Defined in:
lib/strings/truncation/configuration.rb

#position(position = (not_set = true)) ⇒ Object

The position of the omission within the string

Examples:

strings = Strings::Truncation.new

strings.configure do |config|
  config.position :start
end

Parameters:

  • position (Symbol) (defaults to: (not_set = true))

    the position out of :start, :middle or :end



90
91
92
93
94
95
96
# File 'lib/strings/truncation/configuration.rb', line 90

def position(position = (not_set = true))
  if not_set
    @position
  else
    @position = position
  end
end