Class: Arxiv::Downloader::Slug
- Inherits:
-
Object
- Object
- Arxiv::Downloader::Slug
- Defined in:
- lib/arxiv/downloader/slug.rb
Constant Summary collapse
- MAX_LENGTH =
80- TEX_INLINE_MATH =
$...$
/\$[^$]*\$/- TEX_DISPLAY_MATH =
(...) or [...]
/\\\(.*?\\\)|\\\[.*?\\\]/m- TEX_COMMAND =
\emph, \alpha, etc.
/\\[a-zA-Z]+\*?/
Instance Method Summary collapse
-
#initialize(title) ⇒ Slug
constructor
A new instance of Slug.
- #to_s ⇒ Object
Constructor Details
#initialize(title) ⇒ Slug
Returns a new instance of Slug.
12 13 14 |
# File 'lib/arxiv/downloader/slug.rb', line 12 def initialize title @title = title end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/arxiv/downloader/slug.rb', line 16 def to_s truncate strip_tex(@title).to_url end |