README.md in named_accessors-1.0 vs README.md in named_accessors-1.1
- old
+ new
@@ -3,10 +3,16 @@
You ever wanted to create attr_accessor with specified name? Now You can!
## Installation
```ruby
+gem 'named_accessors'
+```
+
+or
+
+```ruby
gem 'named_accessors', git: 'git@github.com:zlw/named_accessors.git'
```
Gem was tested under 1.9.3
@@ -21,9 +27,13 @@
end
named_accessor :title, as: :fancy_title
named_writer :content, as: :post_content
named_reader :created_at, as: :when_was_it_created?
+
+ named_accessor :foo, reader: :foobar, writer: :foobaz
+ named_accessor :foo, as: :bar, reader: :foobar
+ named_accessor :foo, as: :bar, writer: :foobar
end
post = Post.new('Lorem ispum')
post.fancy_title #=> Lorem ipsum
post.fancy_title = 'Bored with lorem ipsum'
\ No newline at end of file