Sha256: 7451fb0a53c773047e13e510a5b4f7074be87879191a5c56fddc931cb55c6e91

Contents?: true

Size: 248 Bytes

Versions: 5

Compression:

Stored size: 248 Bytes

Contents

# frozen_string_literal: true

class Example
	include Phlex::Callable

	def call
		"Hello, world!"
	end
end

def example
	Example.new
end

test "to_proc" do
	expect(example.to_proc).to_be_a Proc
	expect(example.to_proc.call) == "Hello, world!"
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
phlex-1.9.2 gd/phlex/callable.rb
phlex-1.10.1 gd/phlex/callable.rb
phlex-1.10.0 gd/phlex/callable.rb
phlex-1.9.1 gd/phlex/callable.rb
phlex-1.9.0 gd/phlex/callable.rb