Class: Textus::Value::Call
- Inherits:
-
Data
- Object
- Data
- Textus::Value::Call
- Defined in:
- lib/textus/value/call.rb
Instance Attribute Summary collapse
-
#correlation_id ⇒ Object
readonly
Returns the value of attribute correlation_id.
-
#dry_run ⇒ Object
readonly
Returns the value of attribute dry_run.
-
#now ⇒ Object
readonly
Returns the value of attribute now.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#correlation_id ⇒ Object (readonly)
Returns the value of attribute correlation_id
8 9 10 |
# File 'lib/textus/value/call.rb', line 8 def correlation_id @correlation_id end |
#dry_run ⇒ Object (readonly)
Returns the value of attribute dry_run
8 9 10 |
# File 'lib/textus/value/call.rb', line 8 def dry_run @dry_run end |
#now ⇒ Object (readonly)
Returns the value of attribute now
8 9 10 |
# File 'lib/textus/value/call.rb', line 8 def now @now end |
#role ⇒ Object (readonly)
Returns the value of attribute role
8 9 10 |
# File 'lib/textus/value/call.rb', line 8 def role @role end |
Class Method Details
.build(role:, correlation_id: nil, now: nil, dry_run: false) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/textus/value/call.rb', line 9 def self.build(role:, correlation_id: nil, now: nil, dry_run: false) new( role: role.to_s, correlation_id: correlation_id || SecureRandom.uuid, now: now || Textus::Port::Clock.new.now, dry_run: dry_run, ) end |
Instance Method Details
#dry_run? ⇒ Boolean
18 |
# File 'lib/textus/value/call.rb', line 18 def dry_run? = dry_run |
#with_role(new_role) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/textus/value/call.rb', line 20 def with_role(new_role) self.class.new( role: new_role.to_s, correlation_id: correlation_id, now: now, dry_run: dry_run, ) end |