Module: RaygunClient::Controls::Data
- Defined in:
- lib/raygun_client/controls/data.rb
Defined Under Namespace
Modules: JSON
Class Method Summary collapse
- .custom_data ⇒ Object
- .example(custom_data = nil, tags = nil, time: nil) ⇒ Object
- .machine_name ⇒ Object
- .tags ⇒ Object
- .time ⇒ Object
Class Method Details
.custom_data ⇒ Object
35 36 37 |
# File 'lib/raygun_client/controls/data.rb', line 35 def self.custom_data { 'someKey' => 'some value' } end |
.example(custom_data = nil, tags = nil, time: nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/raygun_client/controls/data.rb', line 4 def self.example(custom_data=nil, =nil, time: nil) custom_data ||= self.custom_data ||= self. time ||= self.time data = RaygunClient::Data.build data.occurred_time = time data.machine_name = machine_name data. = data.custom_data = custom_data data.client = RaygunClient::Data::ClientInfo.build data.error = Controls::ErrorData.example data end |
.machine_name ⇒ Object
27 28 29 |
# File 'lib/raygun_client/controls/data.rb', line 27 def self.machine_name 'some machine name' end |
.tags ⇒ Object
31 32 33 |
# File 'lib/raygun_client/controls/data.rb', line 31 def self. ['some-tag'] end |
.time ⇒ Object
23 24 25 |
# File 'lib/raygun_client/controls/data.rb', line 23 def self.time ::Controls::Time.example end |