Class: WebIDL::Ast::Field

Inherits:
Node
  • Object
show all
Defined in:
lib/webidl/ast/field.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#parent

Instance Method Summary collapse

Methods inherited from Node

#accept, #qualified_name, #snake_name

Constructor Details

#initialize(parent, type, name) ⇒ Field

Returns a new instance of Field.



7
8
9
10
# File 'lib/webidl/ast/field.rb', line 7

def initialize(parent, type, name)
  super(parent)
  @type, @name = type, name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/webidl/ast/field.rb', line 5

def name
  @name
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/webidl/ast/field.rb', line 5

def type
  @type
end