File: test_view.rb

package info (click to toggle)
ruby-peek 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 352 kB
  • sloc: ruby: 534; makefile: 7; sh: 2
file content (18 lines) | stat: -rw-r--r-- 287 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'concurrent/atomics'

class TestView < Peek::Views::View
  class << self
    attr_accessor :counter
  end
  self.counter = Concurrent::AtomicFixnum.new

  def results
    {
      number: self.class.counter.increment
    }
  end

  def partial_path
    "peek/test_view"
  end
end