Sha256: 4b9f1affa1b57025cf67579dc8d8fc02cfcf71da21cdcd588d1ba42ea907adcc

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

# Contextify

* [github.com/postmodern/contextify](http://github.com/postmodern/contextify)
* [github.com/postmodern/contextify/issues](http://github.com/postmodern/contextify/issues)
* Postmodern (postmodern.mod3 at gmail.com)

## Description

Contextify can load Ruby Objects containing methods and procs from
Ruby files without having to use YAML or define classes named like the file.

## Examples

    # file: controller.rb
    class Controller
  
      include Contextify
    
      contextify :controller
    
      # ...
    
    end

    # file: my_controller.rb
    controller do
  
      def test1
        'This is the first test'
      end
  
      def test2(mesg)
        "Hello #{mesg}"
      end

    end

    # load a Controller object from a file.
    controller = Controller.load_context('my_controller.rb')
    # => #<Controller: ...>

    controller.test1
    # => "This is the first test"
    controller.test2('one two three')
    # => "Hello one two three"

## Install

    $ sudo gem install contextify

## License

See {file:LICENSE.txt} for license information.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
contextify-0.1.6 README.md