class Array
Public Instance Methods
Source
# File lib/bashly/extensions/array.rb, line 17 def include_sequence?(*elements) return false if elements.empty? each_cons(elements.size).any?(elements) end
Source
# File lib/bashly/extensions/array.rb, line 4 def indent(offset) return self unless offset.positive? indentation = ' ' * offset indenter = Bashly::IndentationHelper.new indentation map { |line| indenter.indent line } end
Source
# File lib/bashly/extensions/array.rb, line 13 def nonuniq tally.select { |_key, count| count > 1 }.keys end