Class: Marley::ReggaeSchema

Inherits:
Array
  • Object
show all
Defined in:
lib/marley/reggae.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ReggaeSchema

Returns a new instance of ReggaeSchema.



119
120
121
122
# File 'lib/marley/reggae.rb', line 119

def initialize(*args)
  super
  replace(map{|spec| ReggaeColSpec.new(spec)})
end

Instance Method Details

#[](i) ⇒ Object



123
124
125
# File 'lib/marley/reggae.rb', line 123

def [](i)
  i.class==Fixnum ?  super : find {|cs|cs.col_name.to_s==i.to_s}
end