Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

important topic on ruby

1.You can use ruby modules as mixins where your design requires multiple inheritance
2.Every method returns the value of its last statement as the value of the method though you can use return where you want to be more explicit.
3.You can open any class again and add methods to it, called monkey patching which can be very powerful if used sensibly otherwise hell will break.
4.You can pass a block of code to any method and operate on it, e.g. in ruby world most of the time coders use iterators instead of for loops.
5.Where possible use symbols instead of strings because they are efficient, e.g. in hash keys
etc..
Comment

PREVIOUS NEXT
Code Example
Ruby :: ruby array of symbols 
Ruby :: ruby to_a 
Ruby :: text_field_tag transfer params rails 
Ruby :: EOFError: end of file reached 
Ruby :: Error occurred while parsing request parameters. 
Ruby :: ruby bundler load error 
Ruby :: rails model on validation custom column name 
Ruby :: find_by column name rails route 
Ruby :: Replacing consecutive numbers with dash between first and last in a range 
Ruby :: my rails server exits automatically 
Ruby :: csv parse ruby 
Ruby :: set db environment to development 
Ruby :: rails partial check if local exists 
Ruby :: ruby md5 
Ruby :: record count by month in rails 
Ruby :: ruby if statement 
R :: dplyr replace na 
R :: r remove leading and trailing whitespace 
R :: tbale() in R 
R :: variable assignment in r 
R :: rename columns in table r 
R :: convert datetime from string r 
R :: ggplot_regression_line 
R :: r append to vector 
R :: check R package 
R :: R vector all but last 
R :: print percentage in r 
R :: R create sequence of date each quarters 
R :: eleminating a char in of a list in r 
R :: Significance codes 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =