Sha256: b0110c550482da924c9d8536f891524e916b012e2eafc8d7f3b0224a3032c25a

Contents?: true

Size: 854 Bytes

Versions: 8

Compression:

Stored size: 854 Bytes

Contents

module WebIDL
  module Ast
    class Operation < Node

      attr_reader :type, :name, :args, :specials, :raises
      attr_accessor :stringifier

      def initialize(parent, type, opts = {})
        @parent   = parent
        @type     = type
        @name     = opts[:name]     || ''
        @specials = opts[:specials] || []
        @args     = opts[:args]     || []
        @raises   = opts[:raises]   || []
      end

      def stringifier?
        !!@stringifier
      end

      def getter?
        @specials.include? 'getter'
      end

      def setter?
        @specials.include? 'setter'
      end

      def creator?
        @specials.include? 'creator'
      end

      def deleter?
        @specials.include? 'deleter'
      end

      def caller?
        @specials.include? 'caller'
      end

    end # Operation
  end # Ast
end # WebIDL

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
webidl-0.0.8 lib/webidl/ast/operation.rb
webidl-0.0.7 lib/webidl/ast/operation.rb
webidl-0.0.6 lib/webidl/ast/operation.rb
webidl-0.0.5 lib/webidl/ast/operation.rb
webidl-0.0.4 lib/webidl/ast/operation.rb
webidl-0.0.3 lib/webidl/ast/operation.rb
webidl-0.0.2 lib/webidl/ast/operation.rb
webidl-0.0.1 lib/webidl/ast/operation.rb