Class: Artifactory::Permissions::V2::Commands::PermissionItemCommand
- Inherits:
-
Object
- Object
- Artifactory::Permissions::V2::Commands::PermissionItemCommand
- Extended by:
- Forwardable
- Defined in:
- lib/artifactory/permissions/v2/commands/permission_item_command.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
Returns the value of attribute item.
-
#permission_target ⇒ Object
readonly
Returns the value of attribute permission_target.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(permission_target:, item:) ⇒ PermissionItemCommand
constructor
A new instance of PermissionItemCommand.
Constructor Details
#initialize(permission_target:, item:) ⇒ PermissionItemCommand
Returns a new instance of PermissionItemCommand.
16 17 18 19 |
# File 'lib/artifactory/permissions/v2/commands/permission_item_command.rb', line 16 def initialize(permission_target:, item:) @permission_target = @item = item end |
Instance Attribute Details
#item ⇒ Object (readonly)
Returns the value of attribute item.
14 15 16 |
# File 'lib/artifactory/permissions/v2/commands/permission_item_command.rb', line 14 def item @item end |
#permission_target ⇒ Object (readonly)
Returns the value of attribute permission_target.
14 15 16 |
# File 'lib/artifactory/permissions/v2/commands/permission_item_command.rb', line 14 def @permission_target end |
Class Method Details
.call(permission_target:, item:) ⇒ Object
10 11 12 |
# File 'lib/artifactory/permissions/v2/commands/permission_item_command.rb', line 10 def self.call(permission_target:, item:) new(permission_target: , item: item).call end |
Instance Method Details
#call ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/artifactory/permissions/v2/commands/permission_item_command.rb', line 21 def call validate_scope validate process if valid? self end |