Sha256: 2b320f0b54595750e9269ea1d7330f762c2f88d58e4fc7d958fda8d21f9d87fd

Contents?: true

Size: 650 Bytes

Versions: 12

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

# WorksCited Module
module WorksCited
  def self.configure(configuration = WorksCited::Configuration.new)
    block_given? && yield(configuration)
    @configuration = configuration
  end

  def self.configuration
    @configuration ||= WorksCited::Configuration.new
  end

  # WorksCited Configuration
  class Configuration
    attr_accessor(
      :valid_citation_types,
      :valid_contributor_roles
    )

    def initialize
      self.valid_citation_types = %w[book periodical electronic interview email tweet]
      self.valid_contributor_roles = %w[author editor compiler translator receiver]
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
works_cited-0.1.16 lib/works_cited/configuration.rb
works_cited-0.1.15 lib/works_cited/configuration.rb
works_cited-0.1.14 lib/works_cited/configuration.rb
works_cited-0.1.13 lib/works_cited/configuration.rb
works_cited-0.1.11 lib/works_cited/configuration.rb
works_cited-0.1.10 lib/works_cited/configuration.rb
works_cited-0.1.9 lib/works_cited/configuration.rb
works_cited-0.1.8 lib/works_cited/configuration.rb
works_cited-0.1.7 lib/works_cited/configuration.rb
works_cited-0.1.6 lib/works_cited/configuration.rb
works_cited-0.1.5 lib/works_cited/configuration.rb
works_cited-0.1.4 lib/works_cited/configuration.rb