Sha256: ac9595850476277f929459148264691215efa2196fa0664b83f3f6c9944ce47c

Contents?: true

Size: 737 Bytes

Versions: 40

Compression:

Stored size: 737 Bytes

Contents

module Eco::API::UseCases::GraphQL::Samples::Location::Service
  module TreeDiff
    module Convertible
      module Parsing
        module Helpers
          private

          def as_boolean(value)
            return false if value.nil? || value == false
            return true  if value == true
            return false if value.to_s.strip.empty?
            return true  if %w[yes x true].include?(value.downcase)
            false
          end

          # Helper to convert to array
          def into_a(value)
            if value.is_a?(String)
              value.split('|')
            else
              [value].flatten
            end.compact
          end
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
eco-helpers-3.0.21 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.20 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.19 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.18 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.17 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.16 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.15 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.14 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.13 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.12 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.11 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.10 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.9 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.8 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.7 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.6 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.5 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.4 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.3 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb
eco-helpers-3.0.2 lib/eco/api/usecases/graphql/samples/location/service/tree_diff/convertible/parsing/helpers.rb