Sha256: e2ae98a610601574ab3caeb23537c3adb8f53c51187ca790e22e4879110abe1e

Contents?: true

Size: 556 Bytes

Versions: 4

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

require_relative './version_class_resolver'

# :nodoc:
module Zakuro
  #
  # Context 暦コンテキスト
  #
  class Context
    attr_reader :version_name
    attr_reader :resolver

    VERSION_NAMES = %w[Genka Gihou Taien Senmyou Joukyou Kansei Tenpou Gregorio].freeze

    def initialize(version_name:)
      raise ArgumentError.new, 'invalid version' unless VERSION_NAMES.include?(version_name)

      @version_name = version_name
      @resolver = VersionClassResolver.new(version_name: version_name)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
zakuro-0.2.0 lib/zakuro/version/context.rb
zakuro-0.1.5 lib/zakuro/version/context.rb
zakuro-0.1.4 lib/zakuro/version/context.rb
zakuro-0.1.3 lib/zakuro/version/context.rb