Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

using module function in main ruby

module UsefulThings
  def self.get_file; ...
  def self.delete_file; ...

  def self.format_text(x); ...
end
    
#Then 
UsefulThings.format_text("xxx")
Comment

PREVIOUS NEXT
Code Example
Ruby :: ruby sinatra enable sessions 
Ruby :: change elements in ruby hashes 
Ruby :: Range extraction: convert a comma separated list of integers into range format 
Ruby :: time loop start with non zero in ruby 
Ruby :: difference between Hash.new and Hash.new { |h, k| h[k] = [] } 
Ruby :: ruby get haft of array 
Ruby :: rspec change matcher 
Ruby :: simpleCov formatter set two formats 
Ruby :: get directory of current file ruby 
R :: r define nested empty list 
R :: random integer in r 
R :: dplyr colnames r 
R :: reverse row order dataframe R 
R :: multiple intersect r 
R :: view table/dataframe in r 
R :: r create a list 
R :: r reverse vector 
R :: correlation matrix in r 
R :: create a table from dataframe in r 
R :: r na if 
R :: ggplot abline thickness 
R :: %in% r 
R :: how to iterate through a list in r 
R :: read delim in r with lapply read.delim sep 
R :: sparklyr alternative for str_detect 
R :: point estimates and prediction intervals in r 
R :: calculating every column means by dplyr 
R :: parent folder for working directory in r 
Rust :: how to exit the program rust 
Rust :: rust request get headers 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =