| 1 |
class A < B; def self.create(object = User) object end end |
| 2 |
class Zebra; def inspect; "X#{2 + self.object_id}" end end |
| 3 |
|
| 4 |
module ABC::DEF |
| 5 |
include Comparable |
| 6 |
|
| 7 |
# @param test |
| 8 |
# @return [String] nothing |
| 9 |
def foo(test) |
| 10 |
Thread.new do |blockvar| |
| 11 |
ABC::DEF.reverse(:a_symbol, :'a symbol', :<=>, 'test' + ?\012) |
| 12 |
answer = valid?4 && valid?CONST && ?A && ?A.ord |
| 13 |
end.join |
| 14 |
end |
| 15 |
|
| 16 |
def [](index) self[index] end |
| 17 |
def ==(other) other == self end |
| 18 |
end |
| 19 |
|
| 20 |
class Car < ActiveRecord::Base |
| 21 |
has_many :wheels, class_name: 'Wheel', foreign_key: 'car_id' |
| 22 |
scope :available, -> { where(available: true) } |
| 23 |
end |
| 24 |
|
| 25 |
hash = {1 => 'one', 2 => 'two'} |
| 26 |
|
| 27 |
2.0.0p0 :001 > ['some'] |
| 28 |
=> ["some"] |