Class: TRuby::IR::InterfaceMember

Inherits:
Node
  • Object
show all
Defined in:
lib/t_ruby/ir.rb

Overview

Interface member (method signature)

Instance Attribute Summary collapse

Attributes inherited from Node

#location, #metadata, #type_info

Instance Method Summary collapse

Methods inherited from Node

#accept, #children, #transform

Constructor Details

#initialize(name:, type_signature:, optional: false, **opts) ⇒ InterfaceMember

Returns a new instance of InterfaceMember.



76
77
78
79
80
81
# File 'lib/t_ruby/ir.rb', line 76

def initialize(name:, type_signature:, optional: false, **opts)
  super(**opts)
  @name = name
  @type_signature = type_signature
  @optional = optional
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



74
75
76
# File 'lib/t_ruby/ir.rb', line 74

def name
  @name
end

#optionalObject

Returns the value of attribute optional.



74
75
76
# File 'lib/t_ruby/ir.rb', line 74

def optional
  @optional
end

#type_signatureObject

Returns the value of attribute type_signature.



74
75
76
# File 'lib/t_ruby/ir.rb', line 74

def type_signature
  @type_signature
end