Class: Parser::EventDescription
- Inherits:
-
Object
- Object
- Parser::EventDescription
- Defined in:
- lib/parser/event_description.rb
Instance Method Summary collapse
- #event_type ⇒ Object
-
#initialize(description) ⇒ EventDescription
constructor
A new instance of EventDescription.
- #user_name ⇒ Object
Constructor Details
#initialize(description) ⇒ EventDescription
Returns a new instance of EventDescription.
5 6 7 |
# File 'lib/parser/event_description.rb', line 5 def initialize(description) @description = description.to_s end |
Instance Method Details
#event_type ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/parser/event_description.rb', line 13 def event_type case @description when /Снятие/ :open when /Постановка/ :close else :unknown end end |
#user_name ⇒ Object
9 10 11 |
# File 'lib/parser/event_description.rb', line 9 def user_name Parser.configuration.users[user_key] || 'Unknown User' end |