Class: Radar::DataExtensions::HostEnvironment
- Inherits:
-
Object
- Object
- Radar::DataExtensions::HostEnvironment
- Defined in:
- lib/radar/data_extensions/host_environment.rb
Overview
Data extension which adds information about the host environment:
- Operating system
- Ruby version
Instance Method Summary collapse
-
#initialize(event) ⇒ HostEnvironment
constructor
A new instance of HostEnvironment.
- #to_hash ⇒ Object
Constructor Details
#initialize(event) ⇒ HostEnvironment
Returns a new instance of HostEnvironment.
9 10 11 |
# File 'lib/radar/data_extensions/host_environment.rb', line 9 def initialize(event) @event = event end |
Instance Method Details
#to_hash ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/radar/data_extensions/host_environment.rb', line 13 def to_hash { :host_environment => { :ruby_version => (RUBY_VERSION rescue '?'), :ruby_pl => (RUBY_PATCHLEVEL rescue '?'), :ruby_release_date => (RUBY_RELEASE_DATE rescue '?'), :ruby_platform => (RUBY_PLATFORM rescue '?') } } end |