Class: RBS::DefinitionBuilder::MethodBuilder::Methods
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Inherits: | Object |
Defined in: | lib/rbs/definition_builder/method_builder.rb |
Class Method Summary
- .new(type:) ⇒ Methods constructor
Instance Attribute Summary
Instance Method Summary
Constructor Details
.new(type:) ⇒ Methods
# File 'lib/rbs/definition_builder/method_builder.rb', line 30
def initialize(type:) @type = type @methods = {} end
Instance Attribute Details
#methods (readonly)
[ GitHub ]# File 'lib/rbs/definition_builder/method_builder.rb', line 28
attr_reader :methods
#type (readonly)
[ GitHub ]# File 'lib/rbs/definition_builder/method_builder.rb', line 27
attr_reader :type
Instance Method Details
#each
[ GitHub ]#validate!
[ GitHub ]# File 'lib/rbs/definition_builder/method_builder.rb', line 35
def validate! methods.each_value do |defn| if defn.originals.size > 1 raise DuplicatedMethodDefinitionError.new( type: type, method_name: defn.name, members: defn.originals ) end end self end