# Array of symbols
%i[address city state post_code country]
=> [:address, :city, :state, :post_code, :country]
# Array of strings
%w[address city state postal country]
=> ["address", "city", "state", "postal", "country"]
# Array of interpolated symbols
postal_label = 'zip'
%I[address city state #{postal_label} country]
=> [:address, :city, :state, :zip, :country]
# Array of interpolated strings
%W[address city state #{postal_label} country]
=> ["address", "city", "state", "zip", "country"]
# Instead of %i[] you may use %i{} or %i() or %i!!
%w(foo bar) is a shortcut for ["foo", "bar"]
Code Example |
---|
Ruby :: hoow to match a complete word in ruby? |
Ruby :: ruby method |
Ruby :: ruby substring |
Ruby :: get directory of current file ruby |
Ruby :: comparator.constructors[0].newInstance([domainClass] in grails 3 |
R :: outlier tagging boxplot r |
R :: remove package in r |
R :: how to count the true values in r |
R :: find data type of vector r |
R :: reverse row order dataframe R |
R :: r convert list to comma separated string |
R :: negative binomial distribution rstudio |
R :: split strings by space in r |
R :: r - change column name |
R :: R make column of rownames |
R :: regex in r |
R :: show 2 ggplots together |
R :: r suppress package loading messages |
R :: find row with na r |
R :: make gif r |
R :: r value statistics |
R :: R drop columns |
R :: R tutorial |
R :: Use regex to extract row in R (solution 1) |
R :: gsub function r |
R :: add column value based on row index r |
R :: Pass argument to group_by (2) |
Rust :: rust string to char array |
Rust :: rust sort |
Rust :: sleep in rust |