hirb snippets

How to customize Hirb output

Tagged hirb, irb, console, rails  Languages ruby

Only print id, created_at and title for FeedItem class:

Hirb.disable
  Hirb.enable :output => {
    "FeedItem"=>{
      :options=>{
        :fields=>%w{id created_at title}
      }
    }
  }