Class: TrangeFrange::Bilion

Inherits:
Struct
  • Object
show all
Includes:
SuffixHelper
Defined in:
lib/trange_frange/bilion.rb

Constant Summary collapse

BILIONS =
%w[milijarda milijarde milijardi]

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#baseObject

Returns the value of attribute base

Returns:

  • (Object)

    the current value of base



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

def base
  @base
end

Instance Method Details

#wordObject



9
10
11
12
13
14
# File 'lib/trange_frange/bilion.rb', line 9

def word
  order_condition.add { BILIONS[0] if suffix.one? and !suffix.suffix_base.teen? }
  order_condition.add { BILIONS[1] if suffix.gender? and !suffix.suffix_base.teen? }
  order_condition.add { BILIONS[2] }
  order_condition.match!
end