Sha256: 6a591574fab5b5f5b724f0e02088f618d3d75fb0f7c4dbcf103a56dd66126fc7

Contents?: true

Size: 456 Bytes

Versions: 10

Compression:

Stored size: 456 Bytes

Contents

module Origen
  module Features
    class Feature
      attr_reader :name
      attr_reader :description

      def initialize(name, options = {})
        @name = name
        @description = options[:description]
      end

      def describe
        return 'No description provided!' if @description == []

        if @description.class == Array
          @description.join(' ')
        else
          @description
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
origen-0.60.18 lib/origen/features/feature.rb
origen-0.60.17 lib/origen/features/feature.rb
origen-0.60.16 lib/origen/features/feature.rb
origen-0.60.14 lib/origen/features/feature.rb
origen-0.60.13 lib/origen/features/feature.rb
origen-0.60.12 lib/origen/features/feature.rb
origen-0.60.11 lib/origen/features/feature.rb
origen-0.60.10 lib/origen/features/feature.rb
origen-0.60.9 lib/origen/features/feature.rb
origen-0.60.8 lib/origen/features/feature.rb