lib/bio-vcf/vcfsample.rb in bio-vcf-0.8.1 vs lib/bio-vcf/vcfsample.rb in bio-vcf-0.8.2

- old
+ new

@@ -49,10 +49,19 @@ end def cache_method(name, &block) self.class.send(:define_method, name, &block) end - + + def [] name + if @format[name] + v = fetch_values(name) + return nil if VcfValue::empty?(v) + return ConvertStringToValue::convert(v) + end + nil + end + def method_missing(m, *args, &block) name = m.to_s.upcase # p [:here,name,m ,@values] # p [:respond_to_call_cached_eval,respond_to?(:call_cached_eval)] if name =~ /\?$/