Sha256: e7913cee20ca9a53e56fa8c5e5c53ed923454a90442a05e412b54c6a60df4d70

Contents?: true

Size: 1.24 KB

Versions: 9

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

module StandupMD
  class Config
    ##
    # The configuration class for StandupMD::Entry
    class Entry
      ##
      # The default options.
      #
      # @return [Hash]
      DEFAULTS = {
        current: ["<!-- ADD TODAY'S WORK HERE -->"],
        previous: [],
        impediments: ['None'],
        notes: []
      }.freeze

      ##
      # Tasks for "Current" section.
      #
      # @param [Array] current
      #
      # @return [Array]
      attr_accessor :current

      ##
      # Tasks for "Previous" section.
      #
      # @param [Array] previous
      #
      # @return [Array]
      attr_accessor :previous

      ##
      # Impediments for this entry.
      #
      # @param [Array] impediments
      #
      # @return [Array]
      attr_accessor :impediments

      ##
      # Notes for this entry.
      #
      # @param [Array] notes
      #
      # @return [Array]
      attr_accessor :notes

      ##
      # Initializes the config with default values.
      def initialize
        reset
      end

      ##
      # Sets all config values back to their defaults.
      #
      # @return [Hash]
      def reset
        DEFAULTS.each { |k, v| instance_variable_set("@#{k}", v) }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
standup_md-0.3.14 lib/standup_md/config/entry.rb
standup_md-0.3.13 lib/standup_md/config/entry.rb
standup_md-0.3.12 lib/standup_md/config/entry.rb
standup_md-0.3.11 lib/standup_md/config/entry.rb
standup_md-0.3.10 lib/standup_md/config/entry.rb
standup_md-0.3.9 lib/standup_md/config/entry.rb
standup_md-0.3.8 lib/standup_md/config/entry.rb
standup_md-0.3.7 lib/standup_md/config/entry.rb
standup_md-0.3.6 lib/standup_md/config/entry.rb