Class: ElVfs::Command

Inherits:
Model
  • Object
show all
Defined in:
lib/el_finder_api/el_vfs/command.rb

Defined Under Namespace

Classes: Arguments, ChangeWorkingDirectory, CopyEntries, CreateDirectory, CreateFile, CreateThumbnail, DestroyEntries, DuplicateEntries, Error, GetAncestors, GetDescendants, ListNames, PackEntries, Ping, ReadFileBody, RenameEntry, ResizeImage, Result, SendFile, Unknown, UnpackEntry, UpdateFileBody, UploadFiles

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#attributes=, #el_hash, options, #to_el_hash

Constructor Details

#initialize(init_params) ⇒ Command

Returns a new instance of Command.



44
45
46
# File 'lib/el_finder_api/el_vfs/command.rb', line 44

def initialize(init_params)
  self.arguments = "#{self.class.name}::Arguments".constantize.new(init_params)
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



23
24
25
# File 'lib/el_finder_api/el_vfs/command.rb', line 23

def arguments
  @arguments
end

#errorObject

Returns the value of attribute error.



23
24
25
# File 'lib/el_finder_api/el_vfs/command.rb', line 23

def error
  @error
end

#resultObject

Returns the value of attribute result.



23
24
25
# File 'lib/el_finder_api/el_vfs/command.rb', line 23

def result
  @result
end

Instance Method Details

#headersObject



52
53
54
# File 'lib/el_finder_api/el_vfs/command.rb', line 52

def headers
  @headers ||= {}
end

#runObject



48
49
50
# File 'lib/el_finder_api/el_vfs/command.rb', line 48

def run
  self.result = "#{self.class.name}::Result".constantize.new(:arguments => arguments, :execute_command => execute_command)
end