Class: Range
Instance Method Summary collapse
Instance Method Details
#reverse ⇒ Object
2 3 4 5 6 |
# File 'lib/origen/core_ext/range.rb', line 2 def reverse first = self.first last = self.last last..first end |
#to_a ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/origen/core_ext/range.rb', line 8 def to_a a = super if a.empty? reverse.to_a.reverse else a end end |