gistlib
other ruby categories
class code snippets in ruby
add a getter to a class in ruby
add a method to a class in ruby
add a method to a subclass in ruby
add a private property to a class in ruby
add a private static method to a class in ruby
add a protected method to a class in ruby
add a protected property to a class in ruby
add a protected static method to a class in ruby
add a protected static property to a class in ruby
add a public property to a class in ruby
add a public static property to a class in ruby
add a setter to a class in ruby
add a setter to a subclass in ruby
add a static method to a class in ruby
add a static property to a class in ruby
call a method on an instance of a class in ruby
call a private static method on an instance of a class in ruby
call a protected property on an instance of a class in ruby
call a protected static property on an instance of a class in ruby
call a public property on an instance of a class in ruby
call a public static method on an instance of a class in ruby
call a static method on an instance of a class in ruby
create a class in ruby
create a class with a constructor in ruby
create an instance of a class with a constructor in ruby
fix this: class flattenarray def self.flatten(ar) return [] if ar.all?(&:nil?) ar.compact! if ar.include?(nil) ar.flatten end end in ruby
give `class grains def self.square(n) 2 ** (n - 1) end` like here: `class phrase < struct.new(:text)` a struct like: in ruby
in the previous answer, is initialize an instance method? in ruby
is there a shortcut for `class isogram def self.isogram? #code here end end in ruby
gistlib
by LogSnag