Class: Textus::Value::Command

Inherits:
Data
  • Object
show all
Defined in:
lib/textus/value/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#paramsObject (readonly)

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



3
4
5
# File 'lib/textus/value/command.rb', line 3

def params
  @params
end

#roleObject (readonly)

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



3
4
5
# File 'lib/textus/value/command.rb', line 3

def role
  @role
end

#verbObject (readonly)

Returns the value of attribute verb

Returns:

  • (Object)

    the current value of 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_runObject



13
# File 'lib/textus/value/command.rb', line 13

def dry_run = params[:dry_run]

#keyObject



11
# File 'lib/textus/value/command.rb', line 11

def key        = params[:key]

#pending_keyObject



12
# File 'lib/textus/value/command.rb', line 12

def pending_key = params[:pending_key]