Sha256: 5afd9110eaeda9531a102ffa85259894a8b7c42a5a6ae80b25406aac08e8993a

Contents?: true

Size: 252 Bytes

Versions: 5

Compression:

Stored size: 252 Bytes

Contents

module Skr

    class GlPeriod < Skr::Model

        is_immutable

        def self.current
            attr = { year: Time.now.year, period: Time.now.month }
            GlPeriod.where( attr ).first || GlPeriod.create( attr )
        end
    end

end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
stockor-0.1.9 lib/skr/models/gl_period.rb
stockor-0.1.8 lib/skr/models/gl_period.rb
stockor-0.1.7 lib/skr/models/gl_period.rb
stockor-0.1.5 lib/skr/models/gl_period.rb
stockor-core-0.2 lib/skr/gl_period.rb