Class: Aladin::Book

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/aladin/book.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ Book

Returns a new instance of Book.



3
4
5
6
7
8
# File 'lib/aladin/book.rb', line 3

def initialize(hash = {})
  super(nil)
  hash.each do |key, value|
    send("#{key.to_s.underscore}=", value)
  end
end