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.54.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.54.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.54.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.53.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.52.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.52.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.51.3 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.51.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.51.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.51.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.50.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.49.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.48.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.48.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.48.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.47.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.47.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.46.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.45.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.45.0 examples/mock_webapp/lib/mock_webapp/user.rb