Sha256: 2e246bb65ca3444a80737835aaf7cd344bfa3a868bb9fc468c423d7e048c7b4e

Contents?: true

Size: 548 Bytes

Versions: 20

Compression:

Stored size: 548 Bytes

Contents

# frozen_string_literal: true

module Mutant
  class AST
    # Node meta information mixin
    module Meta

      # Metadata for optional argument nodes
      class Optarg
        include NamedChildren, Anima.new(:node)

        UNDERSCORE = '_'

        children :name, :default_value

        public :name, :default_value

        # Test if optarg definition intends to be used
        #
        # @return [Boolean]
        def used?
          !name.start_with?(UNDERSCORE)
        end
      end # Optarg

    end # Meta
  end # AST
end # Mutant

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
mutant-0.12.4 lib/mutant/ast/meta/optarg.rb
mutant-0.12.3 lib/mutant/ast/meta/optarg.rb
mutant-0.12.2 lib/mutant/ast/meta/optarg.rb
mutant-0.12.0 lib/mutant/ast/meta/optarg.rb
mutant-0.11.34 lib/mutant/ast/meta/optarg.rb
mutant-0.11.33 lib/mutant/ast/meta/optarg.rb
mutant-0.11.32 lib/mutant/ast/meta/optarg.rb
mutant-0.11.31 lib/mutant/ast/meta/optarg.rb
mutant-0.11.30 lib/mutant/ast/meta/optarg.rb
mutant-0.11.29 lib/mutant/ast/meta/optarg.rb
mutant-0.11.28 lib/mutant/ast/meta/optarg.rb
mutant-0.11.27 lib/mutant/ast/meta/optarg.rb
mutant-0.11.26 lib/mutant/ast/meta/optarg.rb
mutant-0.11.25 lib/mutant/ast/meta/optarg.rb
mutant-0.11.24 lib/mutant/ast/meta/optarg.rb
mutant-0.11.23 lib/mutant/ast/meta/optarg.rb
mutant-0.11.22 lib/mutant/ast/meta/optarg.rb
mutant-0.11.21 lib/mutant/ast/meta/optarg.rb
mutant-0.11.20 lib/mutant/ast/meta/optarg.rb
mutant-0.11.19 lib/mutant/ast/meta/optarg.rb