Class: TrangeFrange::Shaper

Inherits:
Struct
  • Object
show all
Defined in:
lib/trange_frange/shaper.rb

Constant Summary collapse

OPTIONS =
[:bald, :squeeze, :show_fraction]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fractionObject

Returns the value of attribute fraction

Returns:

  • (Object)

    the current value of fraction



4
5
6
# File 'lib/trange_frange/shaper.rb', line 4

def fraction
  @fraction
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



4
5
6
# File 'lib/trange_frange/shaper.rb', line 4

def options
  @options
end

#wordsObject

Returns the value of attribute words

Returns:

  • (Object)

    the current value of words



4
5
6
# File 'lib/trange_frange/shaper.rb', line 4

def words
  @words
end

Instance Method Details

#shape!Object



7
8
9
# File 'lib/trange_frange/shaper.rb', line 7

def shape!
  OPTIONS.each { |option| send(option) if options[option] } and return words
end