summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/ruby-mode-resources/ruby-ts.rb
blob: 9959de4fe71fa6874eae6e759f91a5fbc7de1032 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
variable = foo(
  [
    qwe
  ], [
    rty
  ], {
    a: 3
  }
)

tee = [
  qwe
]

qux = [1,
       2]

att = {a: 1,
       b: 2}

a = 1 ? 2 :(
  2 + 3
)

unless bismark
  sink += 12
else
  dog = 99
end

foo1 =
  subject.update(
    1
  )

foo2 =
  subject.
    update(
      # Might make sense to indent this to 'subject' instead; but this
      # style seems more popular.
      2
    )

foo > bar &&
  tee < qux

1 .. 2 &&
     3

a = foo(j, k) -
    bar_tee

qux = foo.fee ?
        bar :
        tee

# Local Variables:
# mode: ruby-ts
# ruby-after-operator-indent: t
# ruby-block-indent: t
# ruby-method-call-indent: t
# ruby-method-params-indent: t
# End: