Class: WebIDL::Ast::Operation
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#extended_attributes ⇒ Object
Returns the value of attribute extended_attributes.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raises ⇒ Object
readonly
Returns the value of attribute raises.
-
#specials ⇒ Object
readonly
Returns the value of attribute specials.
-
#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
- #creator? ⇒ Boolean
- #deleter? ⇒ Boolean
- #getter? ⇒ Boolean
-
#initialize(parent, type, opts = {}) ⇒ Operation
constructor
A new instance of Operation.
- #legacycaller? ⇒ Boolean
- #setter? ⇒ Boolean
- #static? ⇒ Boolean
- #stringifier? ⇒ Boolean
Methods inherited from Node
#accept, #qualified_name, #snake_name
Constructor Details
#initialize(parent, type, opts = {}) ⇒ Operation
Returns a new instance of Operation.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/webidl/ast/operation.rb', line 8 def initialize(parent, type, opts = {}) @parent = parent @type = type @name = opts[:name] || '' @static = opts[:static] @specials = opts[:specials] || [] @args = opts[:args] || [] @raises = opts[:raises] || [] @extended_attributes = opts[:extended_attributes] || [] end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
5 6 7 |
# File 'lib/webidl/ast/operation.rb', line 5 def args @args end |
#extended_attributes ⇒ Object
Returns the value of attribute extended_attributes.
6 7 8 |
# File 'lib/webidl/ast/operation.rb', line 6 def extended_attributes @extended_attributes end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/webidl/ast/operation.rb', line 5 def name @name end |
#raises ⇒ Object (readonly)
Returns the value of attribute raises.
5 6 7 |
# File 'lib/webidl/ast/operation.rb', line 5 def raises @raises end |
#specials ⇒ Object (readonly)
Returns the value of attribute specials.
5 6 7 |
# File 'lib/webidl/ast/operation.rb', line 5 def specials @specials end |
#stringifier ⇒ Object
Returns the value of attribute stringifier.
6 7 8 |
# File 'lib/webidl/ast/operation.rb', line 6 def stringifier @stringifier end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/webidl/ast/operation.rb', line 5 def type @type end |
Instance Method Details
#creator? ⇒ Boolean
31 32 33 |
# File 'lib/webidl/ast/operation.rb', line 31 def creator? @specials.include? 'creator' end |
#deleter? ⇒ Boolean
35 36 37 |
# File 'lib/webidl/ast/operation.rb', line 35 def deleter? @specials.include? 'deleter' end |
#getter? ⇒ Boolean
23 24 25 |
# File 'lib/webidl/ast/operation.rb', line 23 def getter? @specials.include? 'getter' end |
#legacycaller? ⇒ Boolean
39 40 41 |
# File 'lib/webidl/ast/operation.rb', line 39 def legacycaller? @specials.include? 'legacycaller' end |
#setter? ⇒ Boolean
27 28 29 |
# File 'lib/webidl/ast/operation.rb', line 27 def setter? @specials.include? 'setter' end |
#static? ⇒ Boolean
43 44 45 |
# File 'lib/webidl/ast/operation.rb', line 43 def static? !!@static end |
#stringifier? ⇒ Boolean
19 20 21 |
# File 'lib/webidl/ast/operation.rb', line 19 def stringifier? !!@stringifier end |