Class: WebIDL::Ast::Operation
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#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.
Instance Method Summary collapse
- #caller? ⇒ Boolean
- #creator? ⇒ Boolean
- #deleter? ⇒ Boolean
- #getter? ⇒ Boolean
-
#initialize(parent, type, opts = {}) ⇒ Operation
constructor
A new instance of Operation.
- #setter? ⇒ 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 |
# File 'lib/webidl/ast/operation.rb', line 8 def initialize(parent, type, opts = {}) @parent = parent @type = type @name = opts[:name] || '' @specials = opts[:specials] || [] @args = opts[:args] || [] @raises = opts[:raises] || [] 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 |
#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
#caller? ⇒ Boolean
37 38 39 |
# File 'lib/webidl/ast/operation.rb', line 37 def caller? @specials.include? 'caller' end |
#creator? ⇒ Boolean
29 30 31 |
# File 'lib/webidl/ast/operation.rb', line 29 def creator? @specials.include? 'creator' end |
#deleter? ⇒ Boolean
33 34 35 |
# File 'lib/webidl/ast/operation.rb', line 33 def deleter? @specials.include? 'deleter' end |
#getter? ⇒ Boolean
21 22 23 |
# File 'lib/webidl/ast/operation.rb', line 21 def getter? @specials.include? 'getter' end |
#setter? ⇒ Boolean
25 26 27 |
# File 'lib/webidl/ast/operation.rb', line 25 def setter? @specials.include? 'setter' end |
#stringifier? ⇒ Boolean
17 18 19 |
# File 'lib/webidl/ast/operation.rb', line 17 def stringifier? !!@stringifier end |