Sha256: 56c6069b67d8e5709ca7cddadb576c06e926b3dc65ef805db6eb44fc71518ec4
Contents?: true
Size: 273 Bytes
Versions: 33
Compression:
Stored size: 273 Bytes
Contents
class Author attr_accessor :id attr_accessor :name def initialize(options={}) self.id = options[:id] || 1 self.name = options[:name] || 'Nobody' end # needed for field= to work def [](idx) send(idx) end def url "/authors/#{id}" end end
Version data entries
33 entries across 33 versions & 1 rubygems