Class: Mt::Wall::Plan::Operation
- Inherits:
-
Data
- Object
- Data
- Mt::Wall::Plan::Operation
- Defined in:
- lib/mt/wall/plan.rb
Overview
A single change to apply to a device.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#action(value) ⇒ Object
readonly
:create, :update, :delete or :move.
-
#initialize(action:, path:, payload: {}, position: nil) ⇒ Operation
constructor
A new instance of Operation.
-
#payload(value) ⇒ Object
readonly
the resource attributes; for :update/:delete/:move it also carries the existing row’s ‘.id`.
Constructor Details
#initialize(action:, path:, payload: {}, position: nil) ⇒ Operation
Returns a new instance of Operation.
54 55 56 |
# File 'lib/mt/wall/plan.rb', line 54 def initialize(action:, path:, payload: {}, position: nil) super end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action
53 54 55 |
# File 'lib/mt/wall/plan.rb', line 53 def action @action end |
#path ⇒ Object (readonly)
Returns the value of attribute path
53 54 55 56 57 |
# File 'lib/mt/wall/plan.rb', line 53 Operation = Data.define(:action, :path, :payload, :position) do def initialize(action:, path:, payload: {}, position: nil) super end end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload
53 54 55 |
# File 'lib/mt/wall/plan.rb', line 53 def payload @payload end |
#position ⇒ Object (readonly)
Returns the value of attribute position
53 54 55 56 57 |
# File 'lib/mt/wall/plan.rb', line 53 Operation = Data.define(:action, :path, :payload, :position) do def initialize(action:, path:, payload: {}, position: nil) super end end |
Instance Method Details
#action=(value) ⇒ Object (readonly)
:create, :update, :delete or :move
53 54 55 56 57 |
# File 'lib/mt/wall/plan.rb', line 53 Operation = Data.define(:action, :path, :payload, :position) do def initialize(action:, path:, payload: {}, position: nil) super end end |
#payload=(value) ⇒ Object (readonly)
the resource attributes; for :update/:delete/:move it also carries the existing row’s ‘.id`
53 54 55 56 57 |
# File 'lib/mt/wall/plan.rb', line 53 Operation = Data.define(:action, :path, :payload, :position) do def initialize(action:, path:, payload: {}, position: nil) super end end |