Module: Gemmy::Patches::ArrayPatch::InstanceMethods::Before
- Defined in:
- lib/gemmy/patches/array_patch.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#before(value) ⇒ Object
facets.
Class Method Details
.autotest ⇒ Object
112 113 114 |
# File 'lib/gemmy/patches/array_patch.rb', line 112 def self.autotest [1,2].before(2) == 1 end |
Instance Method Details
#before(value) ⇒ Object
facets
108 109 110 111 |
# File 'lib/gemmy/patches/array_patch.rb', line 108 def before(value) return nil unless include? value self[(index(value).to_i - 1) % length] end |