Sha256: 381f56219961ad16809122d858601596d14c1c8286bbc3aaf1c5e1d6edfad603

Contents?: true

Size: 850 Bytes

Versions: 27

Compression:

Stored size: 850 Bytes

Contents

Foobara.require_project_file("type_declarations", "handlers/extend_attributes_type_declaration/hash_desugarizer")

module Foobara
  module TypeDeclarations
    module Handlers
      class ExtendAttributesTypeDeclaration < ExtendAssociativeArrayTypeDeclaration
        class DslDesugarizer < TypeDeclarations::Desugarizer
          def applicable?(sugary_type_declaration)
            sugary_type_declaration.is_a?(::Proc)
          end

          def desugarize(block)
            Foobara::TypeDeclarations::Dsl::Attributes.to_declaration(&block)
          end

          def priority
            # TODO: need a way to express that we must run after/before other processors so that we could just say
            # we are higher priority than the HashDesugarizer...
            Priority::HIGH - 1
          end
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foobara-0.0.7 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb
foobara-0.0.6 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb
foobara-0.0.5 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb
foobara-0.0.4 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb
foobara-0.0.3 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb
foobara-0.0.2 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb
foobara-0.0.1 projects/type_declarations/src/handlers/extend_attributes_type_declaration/dsl_desugarizer.rb