Class: RubyHeaderParser::EnumDefinition
- Inherits:
-
Object
- Object
- RubyHeaderParser::EnumDefinition
- Defined in:
- lib/ruby_header_parser/enum_definition.rb
Overview
enum definition in header file
Instance Attribute Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Boolean
-
#initialize(name:, values: []) ⇒ EnumDefinition
constructor
A new instance of EnumDefinition.
Constructor Details
#initialize(name:, values: []) ⇒ EnumDefinition
Returns a new instance of EnumDefinition.
16 17 18 19 |
# File 'lib/ruby_header_parser/enum_definition.rb', line 16 def initialize(name:, values: []) @name = name @values = values end |
Instance Attribute Details
#name ⇒ String
8 9 10 |
# File 'lib/ruby_header_parser/enum_definition.rb', line 8 def name @name end |
#values ⇒ Array<String>
12 13 14 |
# File 'lib/ruby_header_parser/enum_definition.rb', line 12 def values @values end |
Instance Method Details
#==(other) ⇒ Boolean
23 24 25 |
# File 'lib/ruby_header_parser/enum_definition.rb', line 23 def ==(other) other.is_a?(EnumDefinition) && name == other.name && values == other.values end |