Sha256: 2a5322061e7df7f519e80c6db89045f701cd2a7dcc8b9b7f38d584c4bf703939

Contents?: true

Size: 374 Bytes

Versions: 1

Compression:

Stored size: 374 Bytes

Contents

# frozen_string_literal: true

module JapaneseCalendar
  module Era
    module Reflection #:nodoc:
      include Era::Calculations

      PERIODS.each do |period|
        define_method "#{period.romaji_name.downcase}?" do
          begin
            period == current_era
          rescue RuntimeError
            false
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
japanese_calendar-0.4.2 lib/japanese_calendar/era/reflection.rb