Class: Flowthings::Drop
- Inherits:
-
PlatformObjectInterface
- Object
- PlatformObjectInterface
- Flowthings::Drop
- Includes:
- Crud::Aggregate, Crud::ExtendedMethods, Crud::Find, Crud::MemberUpdate
- Defined in:
- lib/flowthings/platform_objects/drop.rb
Instance Attribute Summary collapse
-
#flow_id ⇒ Object
Returns the value of attribute flow_id.
-
#flow_ids ⇒ Object
Returns the value of attribute flow_ids.
Instance Method Summary collapse
- #create(data, params = {}) ⇒ Object
-
#initialize(flow_id, connection, options = {}) ⇒ Drop
constructor
A new instance of Drop.
Methods included from Crud::Aggregate
Methods included from Crud::MemberUpdate
Methods included from Crud::Find
Methods included from Crud::ExtendedMethods
Methods included from Crud::Base
#destroy, #read, #read_many, #update
Constructor Details
#initialize(flow_id, connection, options = {}) ⇒ Drop
Returns a new instance of Drop.
17 18 19 20 21 22 23 24 25 |
# File 'lib/flowthings/platform_objects/drop.rb', line 17 def initialize(flow_id, connection, ={}) if flow_id.kind_of? Array @flow_ids = flow_id else @flow_id = flow_id end super connection, end |
Instance Attribute Details
#flow_id ⇒ Object
Returns the value of attribute flow_id.
15 16 17 |
# File 'lib/flowthings/platform_objects/drop.rb', line 15 def flow_id @flow_id end |
#flow_ids ⇒ Object
Returns the value of attribute flow_ids.
15 16 17 |
# File 'lib/flowthings/platform_objects/drop.rb', line 15 def flow_ids @flow_ids end |
Instance Method Details
#create(data, params = {}) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/flowthings/platform_objects/drop.rb', line 27 def create(data, params={}) if !data["path"] && !@flow_id raise ArgumentError.new("You either need a path in the drop data, or the Drop instance needs a flow_id") end super data, params end |