Class: WebIDL::Ast::Attribute

Inherits:
Node
  • Object
show all
Defined in:
lib/webidl/ast/attribute.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, opts = {}) ⇒ Attribute

Returns a new instance of Attribute.



8
9
10
11
12
13
14
15
16
17
# File 'lib/webidl/ast/attribute.rb', line 8

def initialize(parent, type, name, opts = {})
  super(parent)

  @type                = type
  @name                = name
  @readonly            = !!opts[:readonly]
  @setraises           = opts[:setraises] || []
  @getraises           = opts[:getraises] || []
  @extended_attributes = opts[:extended_attributes] || []
end

Instance Attribute Details

#extended_attributesObject

Returns the value of attribute extended_attributes.



6
7
8
# File 'lib/webidl/ast/attribute.rb', line 6

def extended_attributes
  @extended_attributes
end

#getraisesObject (readonly)

Returns the value of attribute getraises.



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

def getraises
  @getraises
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

#setraisesObject (readonly)

Returns the value of attribute setraises.



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

def setraises
  @setraises
end

#stringifierObject

Returns the value of attribute stringifier.



6
7
8
# File 'lib/webidl/ast/attribute.rb', line 6

def stringifier
  @stringifier
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#readonly?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/webidl/ast/attribute.rb', line 19

def readonly?
  @readonly
end

#stringifier?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/webidl/ast/attribute.rb', line 23

def stringifier?
  !!@stringifier
end