class Libri::Awards

Attributes

name[RW]
url[RW]

Public Class Methods

all() click to toggle source
# File lib/libri/awards.rb, line 19
def self.all
    @@all
end
create_from_collection(awards_array) click to toggle source
# File lib/libri/awards.rb, line 13
def self.create_from_collection(awards_array)
    awards_array.map { |awards_hash|
        self.new(awards_hash)
    }
end
new(awards_hash) click to toggle source
# File lib/libri/awards.rb, line 6
def initialize(awards_hash) 
    awards_hash.map { |key, val|
        send "#{key}=", val
    }
    @@all << self
end