Sha256: ec64d0c16e2e92fa4beb8d4b1e71c5c4b7dc1309c31b2a43fca009fbfa2c41e5

Contents?: true

Size: 450 Bytes

Versions: 2

Compression:

Stored size: 450 Bytes

Contents

module PopulateEnv
  class AttributeDefinition
    attr_reader :name, :default, :generator, :description
    
    def initialize(name:, default: nil, generator: nil, description: nil, required: true)
      @name = name.to_s.upcase
      @default = default
      @generator = generator
      @description = description
      @required = required
    end

    def required?
      @required
    end

    def optional?
      !required?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
populate-env-0.1.1 lib/populate_env/attribute_definition.rb
populate-env-0.1.0 lib/populate_env/attribute_definition.rb