Module: GraphQL::FragmentCache::GraphRubyVersion

Defined in:
lib/graphql/fragment_cache/graphql_ruby_version.rb

Class Method Summary collapse

Class Method Details

.after_2_0_13?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/graphql/fragment_cache/graphql_ruby_version.rb', line 14

def after_2_0_13?
  check_graphql_version "> 2.0.13"
end

.after_2_2_5?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/graphql/fragment_cache/graphql_ruby_version.rb', line 22

def after_2_2_5?
  check_graphql_version "> 2.2.5"
end

.before_2_0?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/graphql/fragment_cache/graphql_ruby_version.rb', line 10

def before_2_0?
  check_graphql_version "< 2.0.0"
end

.before_2_1_4?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/graphql/fragment_cache/graphql_ruby_version.rb', line 18

def before_2_1_4?
  check_graphql_version "< 2.1.4"
end

.check_graphql_version(predicate) ⇒ Object



26
27
28
# File 'lib/graphql/fragment_cache/graphql_ruby_version.rb', line 26

def check_graphql_version(predicate)
  Gem::Dependency.new("graphql", predicate).match?("graphql", GraphQL::VERSION)
end