Sha256: 15fe4d1a1e5476ddca9ef2a7e47900ab07325a3c2936c74968b461c1276df073

Contents?: true

Size: 465 Bytes

Versions: 1

Compression:

Stored size: 465 Bytes

Contents

require 'arx/categories'
require 'arx/cleaner'

module Arx

  # Entity/model representing an arXiv paper's category.
  class Category
    include HappyMapper

    tag 'category'

    # @!method name
    # The abbreviated name of the category.
    # @return [String]
    attribute :name, Cleaner, parser: :clean, tag: 'term'

    # The full name of the category.
    # @see CATEGORIES
    # @return [String]
    def full_name
      CATEGORIES[name]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arx-0.3.0 lib/arx/entities/category.rb