debian-mirror-gitlab/app/presenters/packages/npm/package_presenter.rb
2023-06-20 00:43:36 +05:30

27 lines
387 B
Ruby

# frozen_string_literal: true
module Packages
module Npm
class PackagePresenter
def initialize(metadata)
@metadata = metadata
end
def name
metadata[:name]
end
def versions
metadata[:versions]
end
def dist_tags
metadata[:dist_tags]
end
private
attr_reader :metadata
end
end
end