Skip to content

Instantly share code, notes, and snippets.

@cmer
Created October 2, 2012 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmer/3821654 to your computer and use it in GitHub Desktop.
Save cmer/3821654 to your computer and use it in GitHub Desktop.
Ok, Ruby. What's the real here?
[1] pry(#<NotificationCreationService>)> record
=> #<Item id: 58, kind: 1, user_id: 79, community_id: 43, category_id: nil, root_category_id: nil, title: "Autem optio molestias unde laudantium fugit officii...", description: "Aut at quod officiis repellendus. Expedita pariatur...", price: nil, original_price: nil, lowest_price: nil, price_drop_count: 0, for_sale: nil, status: nil, bump_position: 1029, published_at: "2012-09-22 17:48:13", last_bumped_at: "2012-09-23 17:48:13", deleted_at: nil, created_at: "2012-09-22 17:48:13", updated_at: "2012-10-02 17:48:13">
[2] pry(#<NotificationCreationService>)> record.is_a?(Item)
=> false
[3] pry(#<NotificationCreationService>)> record.class.name
=> "Item"
[4] pry(#<NotificationCreationService>)> record.class
=> Item(id: integer, kind: integer, user_id: integer, community_id: integer, category_id: integer, root_category_id: integer, title: string, description: string, price: decimal, original_price: decimal, lowest_price: decimal, price_drop_count: integer, for_sale: boolean, status: integer, bump_position: integer, published_at: datetime, last_bumped_at: datetime, deleted_at: datetime, created_at: datetime, updated_at: datetime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment