Class: ApplicationInsights::Channel::Contracts::StackFrame

Inherits:
JsonSerializable show all
Defined in:
lib/application_insights/channel/contracts/stack_frame.rb

Overview

Data contract class for type StackFrame.

Instance Method Summary collapse

Methods inherited from JsonSerializable

#to_h, #to_json

Constructor Details

#initialize(options = {}) ⇒ StackFrame

Initializes a new instance of the StackFrame class.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 9

def initialize(options={})
  defaults = {
    'level' => nil,
    'method' => nil,
    'assembly' => nil,
    'fileName' => nil,
    'line' => nil
  }
  values = {
    'level' => nil,
    'method' => nil
  }
  super defaults, values, options
end

Instance Method Details

#assemblyObject

Gets the assembly property.



45
46
47
48
49
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 45

def assembly
  @values.fetch('assembly') { 
    @values['assembly'] = nil
  }
end

#assembly=(value) ⇒ Object

Sets the assembly property.



52
53
54
55
56
57
58
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 52

def assembly=(value)
  if value == @defaults['assembly']
    @values.delete 'assembly' if @values.key? 'assembly'
  else
    @values['assembly'] = value
  end
end

#file_nameObject

Gets the file_name property.



61
62
63
64
65
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 61

def file_name
  @values.fetch('fileName') { 
    @values['fileName'] = nil
  }
end

#file_name=(value) ⇒ Object

Sets the file_name property.



68
69
70
71
72
73
74
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 68

def file_name=(value)
  if value == @defaults['fileName']
    @values.delete 'fileName' if @values.key? 'fileName'
  else
    @values['fileName'] = value
  end
end

#levelObject

Gets the level property.



25
26
27
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 25

def level
  @values['level']
end

#level=(value) ⇒ Object

Sets the level property.



30
31
32
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 30

def level=(value)
  @values['level'] = value
end

#lineObject

Gets the line property.



77
78
79
80
81
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 77

def line
  @values.fetch('line') { 
    @values['line'] = nil
  }
end

#line=(value) ⇒ Object

Sets the line property.



84
85
86
87
88
89
90
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 84

def line=(value)
  if value == @defaults['line']
    @values.delete 'line' if @values.key? 'line'
  else
    @values['line'] = value
  end
end

#methodObject

Gets the method property.



35
36
37
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 35

def method
  @values['method']
end

#method=(value) ⇒ Object

Sets the method property.



40
41
42
# File 'lib/application_insights/channel/contracts/stack_frame.rb', line 40

def method=(value)
  @values['method'] = value
end