Class: Typekit::Collection
- Inherits:
-
Object
- Object
- Typekit::Collection
- Extended by:
- Forwardable
- Defined in:
- lib/typekit/collection.rb
Instance Method Summary collapse
-
#initialize(name, collection_attributes = nil) ⇒ Collection
constructor
A new instance of Collection.
Constructor Details
#initialize(name, collection_attributes = nil) ⇒ Collection
Returns a new instance of Collection.
8 9 10 11 12 13 |
# File 'lib/typekit/collection.rb', line 8 def initialize(name, collection_attributes = nil) @klass = Record.classify(name) @records = collection_attributes.map do |attributes| @klass.new(attributes) end end |