Class: RBS::DefinitionBuilder::MethodBuilder::Methods::Definition

Inherits:
Struct
  • Object
show all
Defined in:
lib/rbs/definition_builder/method_builder.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accessibilitiesObject

Returns the value of attribute accessibilities

Returns:

  • (Object)

    the current value of accessibilities



5
6
7
# File 'lib/rbs/definition_builder/method_builder.rb', line 5

def accessibilities
  @accessibilities
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



5
6
7
# File 'lib/rbs/definition_builder/method_builder.rb', line 5

def name
  @name
end

#originalsObject

Returns the value of attribute originals

Returns:

  • (Object)

    the current value of originals



5
6
7
# File 'lib/rbs/definition_builder/method_builder.rb', line 5

def originals
  @originals
end

#overloadsObject

Returns the value of attribute overloads

Returns:

  • (Object)

    the current value of overloads



5
6
7
# File 'lib/rbs/definition_builder/method_builder.rb', line 5

def overloads
  @overloads
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



5
6
7
# File 'lib/rbs/definition_builder/method_builder.rb', line 5

def type
  @type
end

Class Method Details

.empty(name:, type:) ⇒ Object



14
15
16
# File 'lib/rbs/definition_builder/method_builder.rb', line 14

def self.empty(name:, type:)
  new(type: type, name: name, originals: [], overloads: [], accessibilities: [])
end

Instance Method Details

#accessibilityObject



10
11
12
# File 'lib/rbs/definition_builder/method_builder.rb', line 10

def accessibility
  accessibilities[0]
end

#originalObject



6
7
8
# File 'lib/rbs/definition_builder/method_builder.rb', line 6

def original
  originals[0]
end