Method: Timber::Contexts::Runtime#initialize

Defined in:
lib/timber/contexts/runtime.rb

#initialize(attributes) ⇒ Runtime

Returns a new instance of Runtime.



21
22
23
24
25
26
27
28
29
30
# File 'lib/timber/contexts/runtime.rb', line 21

def initialize(attributes)
  normalizer = Util::AttributeNormalizer.new(attributes)
  @application = normalizer.fetch(:application, :string, :limit => APPLICATION_MAX_BYTES)
  @class_name = normalizer.fetch(:class_name, :string, :limit => CLASS_NAME_MAX_BYTES)
  @file = normalizer.fetch(:file, :string, :limit => FILE_MAX_BYTES)
  @function = normalizer.fetch(:function, :string, :limit => FUNCTION_MAX_BYTES)
  @line = normalizer.fetch(:line, :integer)
  @module_name = normalizer.fetch(:module_name, :string, :limit => MODULE_NAME_MAX_BYTES)
  @vm_pid = normalizer.fetch(:vm_pid, :string, :limit => VM_PID_MAX_BYTES)
end