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-1.0.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-1.0.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.103.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.102.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.102.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.102.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.101.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.100.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.99.4 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.99.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.99.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.99.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.98.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.98.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.97.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.96.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.95.2 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.95.1 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.95.0 examples/mock_webapp/lib/mock_webapp/user.rb
appmap-0.94.1 examples/mock_webapp/lib/mock_webapp/user.rb