Class: Eyeballs::AttributeCollector

Inherits:
Object
  • Object
show all
Defined in:
lib/eyeballs/scaffold_generator.rb

Class Method Summary collapse

Class Method Details

.new(attrs) ⇒ Object



48
49
50
51
52
53
# File 'lib/eyeballs/scaffold_generator.rb', line 48

def new(attrs)
  attrs.collect do |attr|
    parts = attr.split(':')
    Attribute.new(:name => parts[0], :type => parts[1])
  end
end