search for: not_middl

Displaying 1 result from an estimated 1 matches for "not_middl".

Did you mean: not_middle
2006 Apr 05
0
each_with_styles, for adding CSS classes
...sible Conditions: # ---------------------------------------------- # :all -- always applies # :first -- only the first element # :not_first -- all but the first element # :last -- only the last element # :not_last -- all but the last element # :middle -- all but the first and last # :not_middle -- first and last only # :odd -- every other, starting with the first # :even -- every other, starting with the second class Array def each_with_styles(styles) styles = Hash.new unless styles && styles.class == Hash each_with_index do |item, index| style_array =...