Sha256: 0e2127487ce3771538f4f7f514e5e635788fb361b0a4a0886fbb251ab4b029fd

Contents?: true

Size: 370 Bytes

Versions: 16

Compression:

Stored size: 370 Bytes

Contents

module Shipit
  class VariableDefinition
    attr_reader :name, :title, :default

    def initialize(attributes)
      @name = attributes.fetch('name')
      @title = attributes['title']
      @default = attributes['default'].to_s
    end

    def to_h
      {
        'name' => @name,
        'title' => @title,
        'default' => @default,
      }
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
shipit-engine-0.13.0 app/models/shipit/variable_definition.rb
shipit-engine-0.12.1 app/models/shipit/variable_definition.rb
shipit-engine-0.12.0 app/models/shipit/variable_definition.rb
shipit-engine-0.11.0 app/models/shipit/variable_definition.rb
shipit-engine-0.10.0 app/models/shipit/variable_definition.rb
shipit-engine-0.9.0 app/models/shipit/variable_definition.rb
shipit-engine-0.8.9 app/models/shipit/variable_definition.rb
shipit-engine-0.8.8 app/models/shipit/variable_definition.rb
shipit-engine-0.8.7 app/models/shipit/variable_definition.rb
shipit-engine-0.8.6 app/models/shipit/variable_definition.rb
shipit-engine-0.8.5 app/models/shipit/variable_definition.rb
shipit-engine-0.8.4 app/models/shipit/variable_definition.rb
shipit-engine-0.8.3 app/models/shipit/variable_definition.rb
shipit-engine-0.8.2 app/models/shipit/variable_definition.rb
shipit-engine-0.8.1 app/models/shipit/variable_definition.rb
shipit-engine-0.8.0 app/models/shipit/variable_definition.rb