Class: Crashdesk::Environment
- Inherits:
-
Object
- Object
- Crashdesk::Environment
- Defined in:
- lib/crashdesk/environment.rb
Instance Attribute Summary collapse
-
#environment_name ⇒ Object
readonly
Returns the value of attribute environment_name.
-
#framework_string ⇒ Object
readonly
Returns the value of attribute framework_string.
-
#project_root ⇒ Object
readonly
Returns the value of attribute project_root.
Instance Method Summary collapse
-
#initialize(args) ⇒ Environment
constructor
A new instance of Environment.
- #to_hash ⇒ Object
Constructor Details
#initialize(args) ⇒ Environment
Returns a new instance of Environment.
9 10 11 12 |
# File 'lib/crashdesk/environment.rb', line 9 def initialize(args) self.project_root = args[:project_root] self.environment_name = args[:environment_name] end |
Instance Attribute Details
#environment_name ⇒ Object
Returns the value of attribute environment_name.
7 8 9 |
# File 'lib/crashdesk/environment.rb', line 7 def environment_name @environment_name end |
#framework_string ⇒ Object (readonly)
Returns the value of attribute framework_string.
7 8 9 |
# File 'lib/crashdesk/environment.rb', line 7 def framework_string @framework_string end |
#project_root ⇒ Object
Returns the value of attribute project_root.
7 8 9 |
# File 'lib/crashdesk/environment.rb', line 7 def project_root @project_root end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/crashdesk/environment.rb', line 14 def to_hash { :project_root => project_root, :environment_name => environment_name, :hostname => Socket.gethostname, :language => 'ruby', :language_version => RUBY_VERSION, :language_platform => RUBY_PLATFORM } end |