# File lib/arel/algebra/header.rb, line 22 22: def ==(other) 23: to_set == other.to_set 24: end
# File lib/arel/algebra/header.rb, line 15 15: def [](key) 16: case key 17: when String, Symbol then find_by_name(key) 18: when Attribute then find_by_attribute(key) 19: end 20: end
# File lib/arel/algebra/header.rb, line 36 36: def bind(relation) 37: Header.new(map { |a| a.bind(relation) }) 38: end
# File lib/arel/algebra/header.rb, line 10 10: def each 11: to_ary.each { |e| yield e } 12: self 13: end
TMP
# File lib/arel/algebra/header.rb, line 41 41: def index(i) 42: to_ary.index(i) 43: end
# File lib/arel/algebra/header.rb, line 32 32: def to_ary 33: @attributes 34: end
# File lib/arel/algebra/header.rb, line 26 26: def union(other) 27: new(to_ary | other) 28: end
# File lib/arel/algebra/header.rb, line 60 60: def find_by_attribute(attr) 61: matching(attr).max do |a, b| 62: (a.original_attribute / attr) <=> (b.original_attribute / attr) 63: end 64: end
# File lib/arel/algebra/header.rb, line 55 55: def find_by_name(name) 56: k = name.to_sym 57: @names[k] ||= @attributes.detect { |a| a.named?(k) } 58: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.