Sha256: 847dfbe9de6eab7329b94de4b393a6ddcebd573ce20d2b3b98a7e6240147c9ea

Contents?: true

Size: 661 Bytes

Versions: 15

Compression:

Stored size: 661 Bytes

Contents

module Foobara
  module BuiltinTypes
    module Model
      # TODO: Create Mutations/SupportedMutations concept
      class Transformers
        class Mutable < TypeDeclarations::Transformer
          class << self
            def requires_parent_declaration_data?
              true
            end
          end

          def transform(record)
            record.mutable = if parent_declaration_data.key?(:mutable)
                               parent_declaration_data[:mutable]
                             else
                               false
                             end

            record
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
foobara-0.0.15 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.14 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.13 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.12 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.11 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.10 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.9 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.8 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.7 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.6 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.5 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.4 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.3 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.2 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb
foobara-0.0.1 projects/model/src/extensions/builtin_types/model/transformers/mutable.rb