Class: Selenium::WebDriver::LogEntry
- Inherits:
-
Object
- Object
- Selenium::WebDriver::LogEntry
- Defined in:
- rb/lib/selenium/webdriver/common/log_entry.rb
Instance Attribute Summary (collapse)
-
- (Object) level
readonly
Returns the value of attribute level.
-
- (Object) message
readonly
Returns the value of attribute message.
-
- (Object) timestamp
readonly
Returns the value of attribute timestamp.
Instance Method Summary (collapse)
- - (Object) as_json(opts = nil)
-
- (LogEntry) initialize(level, timestamp, message)
constructor
A new instance of LogEntry.
- - (Object) time
- - (Object) to_s
Constructor Details
- (LogEntry) initialize(level, timestamp, message)
Returns a new instance of LogEntry
6 7 8 9 10 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 6 def initialize(level, , ) @level = level @timestamp = @message = end |
Instance Attribute Details
- (Object) level (readonly)
Returns the value of attribute level
4 5 6 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 4 def level @level end |
- (Object) message (readonly)
Returns the value of attribute message
4 5 6 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 4 def @message end |
- (Object) timestamp (readonly)
Returns the value of attribute timestamp
4 5 6 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 4 def @timestamp end |
Instance Method Details
- (Object) as_json(opts = nil)
12 13 14 15 16 17 18 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 12 def as_json(opts = nil) { 'level' => level, 'timestamp' => , 'message' => } end |
- (Object) time
24 25 26 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 24 def time Time.at / 1000 end |
- (Object) to_s
20 21 22 |
# File 'rb/lib/selenium/webdriver/common/log_entry.rb', line 20 def to_s "#{level} #{time}: #{}" end |