Sha256: c6131ed5107865a16c80f7c2e96074b08f076cf11270e0877eea57a0d9e93277

Contents?: true

Size: 862 Bytes

Versions: 4

Compression:

Stored size: 862 Bytes

Contents

# SexpInfo

This gem provides nice information about your program based on Ripper sexps. Given a ruby source file called foo.rb

```ruby
class Foo
  def bar(baz, quux = 123)
    "yikes"
  end
end
```

we can do the folliwng

```ruby
  rip = Ripper.sexp(File.read('foo.rb'))
  si = SexpInfo.new(rip)
  si.defined_methods # => ["bar"]
  si["bar"].arity # => 2
  si["bar"].args[1].optional? # => true
```

Please check the specs for more information


## Installation

Add this line to your application's Gemfile:

    gem 'sexp_info'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install sexp_info


## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sexp_info-0.0.4 README.md
sexp_info-0.0.3 README.md
sexp_info-0.0.2 README.md
sexp_info-0.0.1 README.md