Parent

Files

Array

Public Instance Methods

args() click to toggle source
# File lib/sugar-high/arguments.rb, line 2
def args
  flatten.map{|a| a.args}.flatten
end
file_names(ext = '*') click to toggle source
# File lib/sugar-high/file.rb, line 183
def file_names ext = '*'
  self.map{|a| a.gsub( /(.*)\//, '').gsub(/\.#{Regexp.escape(ext)}/, '')}
end
grep_it(expr) click to toggle source
# File lib/sugar-high/regexp.rb, line 24
def grep_it expr
  return self if !expr
  self.grep(expr.to_regexp)
end
none?() click to toggle source
# File lib/sugar-high/array.rb, line 14
def none?
  self.flatten.compact.empty?
end
to_strings(option=nil) click to toggle source
# File lib/sugar-high/array.rb, line 10
def to_strings option=nil
  self.flatten.select_labels.map(&:to_s)
end
to_symbols(option=nil) click to toggle source
# File lib/sugar-high/array.rb, line 4
def to_symbols option=nil
  res = self.flatten
  res.map!{|a| a.kind_of?(Fixnum) ? "_#{a}" : a} if option == :num
  res.select_labels.map(&:to_s).map(&:to_sym)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.