Title / Description
Code require 'csv' class A < B; def self.create(object = User) object end end class Zebra; def inspect; "X#{2 + self.object_id}" end end module ABC::DEF include Comparable # @param test # @return [String] nothing def foo(test) Thread.new do |blockvar| ABC::DEF.reverse(:a_symbol, :'a symbol', :<=>, 'test' + test) end.join end def [](index) self[index] end def ==(other) other == self end end anIdentifier = an_identifier Constant = 1 render action: :new ARCTORIC = 'blah' class CsvReader def initialize @books_in_stock = [] end def read_in_csv_data(csv_file_name) CSV.foreach(csv_file_name, headers: true) do |row| @books_in_stock << BookInStock.new(row["ISBN"], row["Amount"]) end end def total_value_in_stock sum = 0.0 @books_in_stock.each {|book| sum += book.price} sum end def number_of_each_isbn # ... end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code