Class: RBS::Dynamic::Builder::Interface
- Inherits:
-
Base
- Object
- Base
- RBS::Dynamic::Builder::Interface
- Defined in:
- lib/rbs/dynamic/builder.rb
Instance Attribute Summary collapse
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #build ⇒ Object
- #eql?(other) ⇒ Boolean
-
#initialize(name) ⇒ Interface
constructor
A new instance of Interface.
Constructor Details
#initialize(name) ⇒ Interface
Returns a new instance of Interface.
195 196 197 198 |
# File 'lib/rbs/dynamic/builder.rb', line 195 def initialize(name) super() @name = name end |
Instance Attribute Details
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
193 194 195 |
# File 'lib/rbs/dynamic/builder.rb', line 193 def methods @methods end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
192 193 194 |
# File 'lib/rbs/dynamic/builder.rb', line 192 def name @name end |
Instance Method Details
#build ⇒ Object
200 201 202 203 204 205 206 207 208 209 |
# File 'lib/rbs/dynamic/builder.rb', line 200 def build RBS::AST::Declarations::Interface.new( name: @name, type_params: [], members: build_members, annotations: [], location: nil, comment: nil ) end |
#eql?(other) ⇒ Boolean
211 212 213 214 |
# File 'lib/rbs/dynamic/builder.rb', line 211 def eql?(other) self.methods.map { |_, method| [method.name, method.kind, method.sigs] } == other.methods.map { |_, method| [method.name, method.kind, method.sigs] } end |