Class: Ulmul::Event
- Inherits:
-
Object
- Object
- Ulmul::Event
- Defined in:
- lib/ulmul.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(line) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(line) ⇒ Event
Returns a new instance of Event.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
# File 'lib/ulmul.rb', line 377 def initialize(line) @line = line @event = case line when /^=begin/,/^#/ then 'ignore' when /^=end/ then 'end' when /^=+ / then 'heading' when /^ +\*/ then 'asterisk' when /^\s*$/ then 'empty' when /^\s+/ then 'offset' when /^Eq\./ then 'eq_begin' when /^\/Eq/ then 'eq_end' when /^Fig\./ then 'fig_begin' when /^\/Fig/ then 'fig_end' else 'normal' end end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
376 377 378 |
# File 'lib/ulmul.rb', line 376 def event @event end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
376 377 378 |
# File 'lib/ulmul.rb', line 376 def line @line end |