Module: RSpec::Support::RubyFeatures

### Home Classes Methods

### In Files

- lib/rspec/support/ruby_features.rb

### Methods

- #caller_locations_supported?
- #foo
- #kw_args_supported?
- #module_prepends_supported?
- #optional_and_splat_args_supported?
- #required_kw_args_supported?
- #supports_rebinding_module_methods?

### Class/Module Index

Quicksearch

- RSpec
- RSpec::CallerFilter
- RSpec::Support
- RSpec::Support::BlockSignature
- RSpec::Support::Differ
- RSpec::Support::DirectoryMaker
- RSpec::Support::EncodedString
- RSpec::Support::FormattingSupport
- RSpec::Support::FuzzyMatcher
- RSpec::Support::HunkGenerator
- RSpec::Support::InSubProcess
- RSpec::Support::LooseSignatureVerifier
- RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
- RSpec::Support::MethodSignature
- RSpec::Support::MethodSignatureVerifier
- RSpec::Support::OS
- RSpec::Support::RecursiveConstMethods
- RSpec::Support::Ruby
- RSpec::Support::RubyFeatures
- RSpec::Support::ShellOut
- RSpec::Support::Spec
- RSpec::Support::StdErrSplitter
- RSpec::Support::StrictSignatureVerifier
- RSpec::Support::Version
- RSpec::Support::VersionChecker
- RSpec::Support::Warnings
- RSpec::Support::WarningsPrevention
- RSpec::Support::WithIsolatedStdErr
- Object
- RSpecHelpers

No matching classes.

# RSpec::Support::RubyFeatures

@api private

Provides query methods for ruby features that differ among implementations.

### Public Instance Methods

caller_locations_supported?() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 52
    def caller_locations_supported?
      respond_to?(:caller_locations, true)
    end

foo() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 98
    def foo; end

kw_args_supported?() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 57
    def kw_args_supported?
      RUBY_VERSION >= '2.0.0'
    end

module_prepends_supported?() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 111
    def module_prepends_supported?
      Module.method_defined?(:prepend) || Module.private_method_defined?(:prepend)
    end

optional_and_splat_args_supported?() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 48
    def optional_and_splat_args_supported?
      Method.method_defined?(:parameters)
    end

required_kw_args_supported?() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 61
    def required_kw_args_supported?
      RUBY_VERSION >= '2.1.0'
    end

supports_rebinding_module_methods?() click to toggle source

    # File lib/rspec/support/ruby_features.rb, line 65
    def supports_rebinding_module_methods?
      RUBY_VERSION.to_i >= 2
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.