Sha256: e46af33b42a80d8c592f3f8b13b11b5887ca2c7c39c5a028918fe2664eedd81f

Contents?: true

Size: 239 Bytes

Versions: 4

Compression:

Stored size: 239 Bytes

Contents

# encoding: utf-8

module TrangeFrange
  class Member < Struct.new :base
    def one
      base[-1]
    end

    def ten
      base.size >= 2 ? base[-2] : '0'
    end

    def hundred
      base.size == 3 ? base[-3] : '0'
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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