Turns your ruby object into a method object
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
spec
.gitignore
.rspec
.ruby-gemset
.travis.yml
CONTRIBUTING.md
Gemfile
LICENSE
README.md
Rakefile
procto.gemspec

README.md

procto

Gem Version Build Status Dependency Status Code Climate Coverage Status

Usage

require 'procto'

class Greeter
  include Procto.call

  def initialize(text)
    @text = text
  end

  def call
    "Hello #{text}"
  end
end

Greeter.call('world') # => "Hello world"

class Printer
  include Procto.call(:print)

  def initialize(text)
    @text = text
  end

  def print
    "Hello #{text}"
  end
end

Printer.call('world') # => "Hello world"

Credits

Contributing

See CONTRIBUTING.md for details.

Copyright

Copyright © 2013 Martin Gamsjaeger (snusnu). See LICENSE for details.