Class: Files::Action

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ Action

Returns a new instance of Action.



7
8
9
10
# File 'lib/files.com/models/action.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/action.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/action.rb', line 5

def options
  @options
end

Instance Method Details

#actionObject

string - Type of action



63
64
65
# File 'lib/files.com/models/action.rb', line 63

def action
  @attributes[:action]
end

#destinationObject

string - The destination path for this action, if applicable



28
29
30
# File 'lib/files.com/models/action.rb', line 28

def destination
  @attributes[:destination]
end

#displayObject

string - Friendly displayed output



33
34
35
# File 'lib/files.com/models/action.rb', line 33

def display
  @attributes[:display]
end

#failure_typeObject

string - Failure type. If action was a user login or session failure, why did it fail?



68
69
70
# File 'lib/files.com/models/action.rb', line 68

def failure_type
  @attributes[:failure_type]
end

#idObject

int64 - Action ID



13
14
15
# File 'lib/files.com/models/action.rb', line 13

def id
  @attributes[:id]
end

#interfaceObject

string - Interface on which this action occurred.



73
74
75
# File 'lib/files.com/models/action.rb', line 73

def interface
  @attributes[:interface]
end

#ipObject

string - IP Address that performed this action



38
39
40
# File 'lib/files.com/models/action.rb', line 38

def ip
  @attributes[:ip]
end

#pathObject

string - Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.



18
19
20
# File 'lib/files.com/models/action.rb', line 18

def path
  @attributes[:path]
end

#sourceObject

string - The source path for this action, if applicable



43
44
45
# File 'lib/files.com/models/action.rb', line 43

def source
  @attributes[:source]
end

#targetsObject

array(object) - Targets



48
49
50
# File 'lib/files.com/models/action.rb', line 48

def targets
  @attributes[:targets]
end

#user_idObject

int64 - User ID



53
54
55
# File 'lib/files.com/models/action.rb', line 53

def user_id
  @attributes[:user_id]
end

#usernameObject

string - Username



58
59
60
# File 'lib/files.com/models/action.rb', line 58

def username
  @attributes[:username]
end

#whenObject

date-time - Action occurrence date/time



23
24
25
# File 'lib/files.com/models/action.rb', line 23

def when
  @attributes[:when]
end