Class: WebIDL::Ast::Attribute
Instance Attribute Summary collapse
-
#extended_attributes ⇒ Object
Returns the value of attribute extended_attributes.
-
#getraises ⇒ Object
readonly
Returns the value of attribute getraises.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#setraises ⇒ Object
readonly
Returns the value of attribute setraises.
-
#stringifier ⇒ Object
Returns the value of attribute stringifier.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(parent, type, name, opts = {}) ⇒ Attribute
constructor
A new instance of Attribute.
- #readonly? ⇒ Boolean
- #stringifier? ⇒ Boolean
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_attributes ⇒ Object
Returns the value of attribute extended_attributes.
6 7 8 |
# File 'lib/webidl/ast/attribute.rb', line 6 def extended_attributes @extended_attributes end |
#getraises ⇒ Object (readonly)
Returns the value of attribute getraises.
5 6 7 |
# File 'lib/webidl/ast/attribute.rb', line 5 def getraises @getraises end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/webidl/ast/attribute.rb', line 5 def name @name end |
#setraises ⇒ Object (readonly)
Returns the value of attribute setraises.
5 6 7 |
# File 'lib/webidl/ast/attribute.rb', line 5 def setraises @setraises end |
#stringifier ⇒ Object
Returns the value of attribute stringifier.
6 7 8 |
# File 'lib/webidl/ast/attribute.rb', line 6 def stringifier @stringifier end |
#type ⇒ Object (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
19 20 21 |
# File 'lib/webidl/ast/attribute.rb', line 19 def readonly? @readonly end |
#stringifier? ⇒ Boolean
23 24 25 |
# File 'lib/webidl/ast/attribute.rb', line 23 def stringifier? !!@stringifier end |