Sha256: 5c3dea2bbea3f9374e37e879d54309b80f83cc992b86aae250e6eaae8fd92b86

Contents?: true

Size: 1016 Bytes

Versions: 38

Compression:

Stored size: 1016 Bytes

Contents

module Foobara
  module BuiltinTypes
    module Tuple
      module SupportedProcessors
        class ElementTypeDeclarations < TypeDeclarations::ElementProcessor
          module TypeDeclarationExtension
            module ExtendTupleTypeDeclaration
              module Desugarizers
                class SetSize < TypeDeclarations::Desugarizer
                  def applicable?(value)
                    if value.is_a?(::Hash)
                      value.key?(:element_type_declarations) && value[:type] == :tuple && !value.key?(:size)
                    end
                  end

                  def desugarize(rawish_type_declaration)
                    rawish_type_declaration[:size] = rawish_type_declaration[:element_type_declarations].size
                    rawish_type_declaration
                  end

                  def priority
                    Priority::LOW
                  end
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
foobara-0.0.18 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.17 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.16 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.15 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.14 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.13 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.12 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.11 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.10 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.9 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.8 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.7 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.6 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.5 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.4 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.3 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.2 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb
foobara-0.0.1 projects/builtin_types/src/tuple/supported_processors/element_type_declarations/type_declaration_extension/extend_tuple_type_declaration/desugarizers/set_size.rb