Sha256: cb40af59a841b8fc3db65e245f88bee42311374da38c2d07321b7d4259163f93

Contents?: true

Size: 307 Bytes

Versions: 158

Compression:

Stored size: 307 Bytes

Contents

module MockWebapp
  UserStruct = Struct.new(:login)

  # Mock model object.
  # @appmap
  class User < UserStruct
    USERS = {
      'alice' => User.new('alice')
    }.freeze

    class << self
      # @appmap
      def find(id)
        USERS[id] || raise("No such user #{id}")
      end
    end
  end
end

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
appmap-0.34.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.34.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.33.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.32.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.31.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.28.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.28.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.27.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.26.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.26.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.25.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.25.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.23.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.22.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.21.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.20.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.19.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.18.1 examples/mock_webapp/lib/mock_webapp/user.rb