Class: Picky::Generators::Partial::Postfix

Inherits:
Substring show all
Defined in:
lib/picky/generators/partial/postfix.rb

Instance Method Summary collapse

Methods inherited from Substring

#each_partial, #from, #to

Methods inherited from Strategy

#use_exact_for_partial?

Methods inherited from Strategy

#saved?, #to_s

Constructor Details

#initialize(options = {}) ⇒ Postfix

The from option signifies where in the symbol it will start in generating the subtokens.

Examples:

With :hello

  • from: 1 # => [:hello, :hell, :hel, :he, :h]

  • from: 4 # => [:hello, :hell]



18
19
20
21
22
# File 'lib/picky/generators/partial/postfix.rb', line 18

def initialize options = {}
  options[:to] = -1

  super options
end