Class: Mio::Model::Rename

Inherits:
Mio::Model show all
Defined in:
lib/mio/model/rename.rb

Instance Attribute Summary

Attributes inherited from Mio::Model

#args, #client, #search

Instance Method Summary collapse

Methods inherited from Mio::Model

#configure, #create, field, #go, #initialize, mappings, nested, #set_enable, set_resource, #set_start, #validate

Constructor Details

This class inherits a constructor from Mio::Model

Instance Method Details

#config_hashObject



24
25
26
27
28
29
30
31
32
# File 'lib/mio/model/rename.rb', line 24

def config_hash
  {
      "file": { "file-name": {  "value": @args.filePath,
                                "isExpression": false
                             },
              "preserve-file-extension": @args.preserveFileExtension
              }
  }
end

#create_hashObject



14
15
16
17
18
19
20
21
22
# File 'lib/mio/model/rename.rb', line 14

def create_hash
  plugin = 'tv.nativ.mio.enterprise.execution.action.file.impl.rename.AssetRenameCommand'
  {name: @args.name,
   pluginClass: plugin,
   visibilityIds: @args.visibility,
   'type': 'rename',
   'runRuleExpression': @args.runRuleExpression
  }
end