Sha256: d5ccf67c5c053968228df2e1309b105fe9e5e0557393a80f8e7a2c26177b3d55

Contents?: true

Size: 543 Bytes

Versions: 4

Compression:

Stored size: 543 Bytes

Contents

# encoding: utf-8

module TrangeFrange
  class Hundred < Struct.new :base
    include TrangeFrange::BaseHelper

    HUNDREDS = {
      '0' => '',
      '1' => 'jedna stotina',
      '2' => 'dve stotine',
      '3' => 'tri stotine',
      '4' => 'četiri stotine',
      '5' => 'pet stotina',
      '6' => 'šest stotina',
      '7' => 'sedam stotina',
      '8' => 'osam stotina',
      '9' => 'devet stotina'
    }

    def word
      order_condition.add { HUNDREDS[object_base.member.hundred] }
      order_condition.match!
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trange_frange-0.1.5 lib/trange_frange/hundred.rb
trange_frange-0.1.4 lib/trange_frange/hundred.rb
trange_frange-0.1.3 lib/trange_frange/hundred.rb
trange_frange-0.1.2 lib/trange_frange/hundred.rb