class ArrayWithoutBlank
Public Class Methods
new(*several_variants)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 4 def self.new(*several_variants) arr = super arr.reject!(&:blank?) arr end
Public Instance Methods
+(other_ary)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 36 def +(other_ary) super other_ary.reject(&:blank?) end
<<(obj)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 40 def <<(obj) return self if obj.blank? super end
[]=(index, obj)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 27 def []=(index, obj) return self[index] if obj.blank? super end
concat(other_ary)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 32 def concat(other_ary) super other_ary.reject(&:blank?) end
initialize_copy(other_ary)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 10 def initialize_copy(other_ary) super other_ary.reject(&:blank?) end
insert(*args)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 23 def insert(*args) super(*args.reject(&:blank?)) end
push(obj, *smth)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 18 def push(obj, *smth) return self if obj.blank? super end
replace(other_ary)
click to toggle source
Calls superclass method
# File lib/core_ext/array_without_blank.rb, line 14 def replace(other_ary) super other_ary.reject(&:blank?) end
to_ary()
click to toggle source
# File lib/core_ext/array_without_blank.rb, line 45 def to_ary Array.new(self) end