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