Sha256: e9912f658f61388be36378f3f494ecfb62f7cb80912ffb71417c0cb6135e8e33

Contents?: true

Size: 600 Bytes

Versions: 1

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module RubyHeaderParser
  # enum definition in header file
  class EnumDefinition
    # @!attribute name
    #   @return [String]
    attr_accessor :name

    # @!attribute values
    #   @return [Array<String>]
    attr_accessor :values

    # @param name [String]
    # @param values [Array<String>]
    def initialize(name:, values: [])
      @name = name
      @values = values
    end

    # @param other [EnumDefinition]
    # @return [Boolean]
    def ==(other)
      other.is_a?(EnumDefinition) && name == other.name && values == other.values
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_header_parser-0.2.0 lib/ruby_header_parser/enum_definition.rb