Class: Textus::Value::Command
- Inherits:
-
Data
- Object
- Data
- Textus::Value::Command
- Defined in:
- lib/textus/value/command.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #dry_run ⇒ Object
-
#initialize(verb:, params:, role:) ⇒ Command
constructor
A new instance of Command.
- #key ⇒ Object
- #pending_key ⇒ Object
Constructor Details
#initialize(verb:, params:, role:) ⇒ Command
Returns a new instance of Command.
4 5 6 7 8 |
# File 'lib/textus/value/command.rb', line 4 def initialize(verb:, params:, role:) super params.freeze freeze end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params
3 4 5 |
# File 'lib/textus/value/command.rb', line 3 def params @params end |
#role ⇒ Object (readonly)
Returns the value of attribute role
3 4 5 |
# File 'lib/textus/value/command.rb', line 3 def role @role end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb
3 4 5 |
# File 'lib/textus/value/command.rb', line 3 def verb @verb end |
Instance Method Details
#[](key) ⇒ Object
10 |
# File 'lib/textus/value/command.rb', line 10 def [](key) = params[key] |
#dry_run ⇒ Object
13 |
# File 'lib/textus/value/command.rb', line 13 def dry_run = params[:dry_run] |
#key ⇒ Object
11 |
# File 'lib/textus/value/command.rb', line 11 def key = params[:key] |
#pending_key ⇒ Object
12 |
# File 'lib/textus/value/command.rb', line 12 def pending_key = params[:pending_key] |