0.0
No commit activity in last 3 years
No release in over 3 years
provides a method for debugging like var_dump() of php.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3.5
>= 0.5.3
>= 0.9.2.2
>= 2.7.0

Runtime

 Project Readme

Build Status

Rack var_dump

rack-var-dump provides a method for debugging, such as var_dump() of php.

The receiver output automatically to view all of the var_dump() was executed Model, Controller, View, in the context var_dump other methods to provide the Object, to return a response Rack.

The output uses a michaeldv / awesome_print.

Supported versions

  • Ruby 1.8.7, 1.9.x

  • Applications that use the Rack (rails, sinatra, padrino, etc...)

Instration

Add to Gemfile

gem 'rack-var-dump'

Rails3.x

require 'rails-var-dump'

Other

require 'rack/var_dump'

and

use Rack::VarDump

Usage

If you require a rack/var_dump, has been provided

var_dump(subject = nil)

to all objects or rails-var-dump

Example

@users = User.all.var_dump

The return value of var_dump because of the self, the chain can be used.

@first_name = User.find(3).var_dump('user.id(3)').first_name

By giving an argument, you can use the option of awesome_print.

@users.var_dump("user.all")                 #=> normal print
@users.var_dump("user.all", :plain => true) #=> plain text
@users.var_dump(:plain => true)             #=> subject can be omitted

Copyright

Copyright (c) 2012 Daichi Hirata. See LICENSE for details.