Class: FiberAudit::Runtime::Session
- Inherits:
-
Data
- Object
- Data
- FiberAudit::Runtime::Session
- Defined in:
- lib/fiber_audit/runtime/session.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
-
#ruby_version ⇒ Object
readonly
Returns the value of attribute ruby_version.
-
#started_at ⇒ Object
readonly
Returns the value of attribute started_at.
-
#started_monotonic_ns ⇒ Object
readonly
Returns the value of attribute started_monotonic_ns.
-
#tool_version ⇒ Object
readonly
Returns the value of attribute tool_version.
Instance Method Summary collapse
-
#initialize(id:, started_at:, started_monotonic_ns:, policy: Policy.new, tool_version: FiberAudit::VERSION, ruby_version: RUBY_VERSION) ⇒ Session
constructor
A new instance of Session.
Constructor Details
#initialize(id:, started_at:, started_monotonic_ns:, policy: Policy.new, tool_version: FiberAudit::VERSION, ruby_version: RUBY_VERSION) ⇒ Session
Returns a new instance of Session.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/fiber_audit/runtime/session.rb', line 17 def initialize( id:, started_at:, started_monotonic_ns:, policy: Policy.new, tool_version: FiberAudit::VERSION, ruby_version: RUBY_VERSION ) super( id: normalize_id(id), started_at: Validation.utc_time(started_at, 'started_at'), started_monotonic_ns: Validation.integer(started_monotonic_ns, 'started_monotonic_ns'), policy: normalize_policy(policy), tool_version: Validation.string(tool_version, 'tool_version', max_bytes: 64), ruby_version: Validation.string(ruby_version, 'ruby_version', max_bytes: 64) ) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id
9 10 11 |
# File 'lib/fiber_audit/runtime/session.rb', line 9 def id @id end |
#policy ⇒ Object (readonly)
Returns the value of attribute policy
9 10 11 |
# File 'lib/fiber_audit/runtime/session.rb', line 9 def policy @policy end |
#ruby_version ⇒ Object (readonly)
Returns the value of attribute ruby_version
9 10 11 |
# File 'lib/fiber_audit/runtime/session.rb', line 9 def ruby_version @ruby_version end |
#started_at ⇒ Object (readonly)
Returns the value of attribute started_at
9 10 11 |
# File 'lib/fiber_audit/runtime/session.rb', line 9 def started_at @started_at end |
#started_monotonic_ns ⇒ Object (readonly)
Returns the value of attribute started_monotonic_ns
9 10 11 |
# File 'lib/fiber_audit/runtime/session.rb', line 9 def started_monotonic_ns @started_monotonic_ns end |
#tool_version ⇒ Object (readonly)
Returns the value of attribute tool_version
9 10 11 |
# File 'lib/fiber_audit/runtime/session.rb', line 9 def tool_version @tool_version end |