Skip to content

Commit

Permalink
Added irb instructions for another example
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyObtiva committed Mar 24, 2015
1 parent f699940 commit 1192e07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ CourseEnrollment.new(course_id: course.id).valid?

## Another Example

Copy and paste the following code snippets in <code>irb</code> and you should get the output denoted by double arrows (<code>=></code>).

```ruby
require 'super_module'

Expand Down Expand Up @@ -230,19 +232,27 @@ MediaAuthorization.create.errors.messages.inspect

=> "{:credit_card_id=>[\"can't be blank\"], :user_id=>[\"can't be blank\"]}"

```ruby
MediaAuthorization.new.foo
```

=> "foo"

```ruby
MediaAuthorization.new.bar
```

=> "bar"

```ruby
MediaAuthorization.foo
```

=> "self.foo"

```ruby
MediaAuthorization.bar
```

=> "self.bar"

Expand Down

0 comments on commit 1192e07

Please sign in to comment.