Class: Enumark::Category

Inherits:
Object
  • Object
show all
Defined in:
lib/enumark/category.rb

Constant Summary collapse

START =
/^\s.*<DT><H3/
ENDIND =
/^\s.*<\/DL><p>/
PATTERN =
/ADD_DATE="(.*?)".*LAST_MODIFIED="(.*?)".*>(.*)<\/H3/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line) ⇒ Category

Returns a new instance of Category.



14
15
16
17
18
19
# File 'lib/enumark/category.rb', line 14

def initialize(line)
  m = line.match(PATTERN)
  @add_date = m[1]
  @last_mod = m[2]
  @name = m[3]
end

Instance Attribute Details

#nameObject (readonly) Also known as: inspect, to_s

Returns the value of attribute name.



10
11
12
# File 'lib/enumark/category.rb', line 10

def name
  @name
end