Sha256: e916afe5e9cc59fa308dc7ce42bdfd2e71f77deade5e40c749148c25a4625db8

Contents?: true

Size: 590 Bytes

Versions: 3

Compression:

Stored size: 590 Bytes

Contents

require "test_helper"

class DocsOptionTest < Minitest::Spec
  it do
    #:method
    option = Trailblazer::Option(:object_id)
    option.(exec_context: Object.new) # => 1234567
    #:method end

    #:lambda
    option = Trailblazer::Option(-> { object_id })
    option.(exec_context: Object.new) # => 1234567
    #:lambda end

    #:module
    class CallMe
      def self.call(message:, **options)
        message
      end
    end

    option = Trailblazer::Option(CallMe)
    option.(keyword_arguments: { message: "hello!" }, exec_context: nil) # => "hello!"
    #:module end
  end
end

Version data entries

3 entries across 3 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/trailblazer-option-0.1.2/test/docs/option_test.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/trailblazer-option-0.1.2/test/docs/option_test.rb
trailblazer-option-0.1.2 test/docs/option_test.rb