Module: ArraysManipulation
- Defined in:
- lib/pipes/arrays.rb
Class Method Summary collapse
- .cut(content, args) ⇒ Object
- .first(content, args) ⇒ Object
- .get(content, args) ⇒ Object
- .last(content, args) ⇒ Object
Class Method Details
.cut(content, args) ⇒ Object
14 15 16 |
# File 'lib/pipes/arrays.rb', line 14 def self.cut(content, args) content = content[args[0]..args[1]] end |
.first(content, args) ⇒ Object
2 3 4 |
# File 'lib/pipes/arrays.rb', line 2 def self.first(content, args) content = content.first end |
.get(content, args) ⇒ Object
10 11 12 |
# File 'lib/pipes/arrays.rb', line 10 def self.get(content, args) content = content[args[0]] end |
.last(content, args) ⇒ Object
6 7 8 |
# File 'lib/pipes/arrays.rb', line 6 def self.last(content, args) content = content.last end |