Class: Files::Action
- Inherits:
-
Object
- Object
- Files::Action
- Defined in:
- lib/files.com/models/action.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#action ⇒ Object
string - Type of action.
-
#destination ⇒ Object
string - The destination path for this action, if applicable.
-
#display ⇒ Object
string - Friendly displayed output.
-
#failure_type ⇒ Object
string - Failure type.
-
#id ⇒ Object
int64 - Action ID.
-
#initialize(attributes = {}, options = {}) ⇒ Action
constructor
A new instance of Action.
-
#interface ⇒ Object
string - Interface on which this action occurred.
-
#ip ⇒ Object
string - IP Address that performed this action.
-
#path ⇒ Object
string - Path.
-
#source ⇒ Object
string - The source path for this action, if applicable.
-
#targets ⇒ Object
array(object) - Targets.
-
#user_id ⇒ Object
int64 - User ID.
-
#username ⇒ Object
string - Username.
-
#when ⇒ Object
date-time - Action occurrence date/time.
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 = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/files.com/models/action.rb', line 5 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/action.rb', line 5 def @options end |
Instance Method Details
#action ⇒ Object
string - Type of action
63 64 65 |
# File 'lib/files.com/models/action.rb', line 63 def action @attributes[:action] end |
#destination ⇒ Object
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 |
#display ⇒ Object
string - Friendly displayed output
33 34 35 |
# File 'lib/files.com/models/action.rb', line 33 def display @attributes[:display] end |
#failure_type ⇒ Object
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 |
#id ⇒ Object
int64 - Action ID
13 14 15 |
# File 'lib/files.com/models/action.rb', line 13 def id @attributes[:id] end |
#interface ⇒ Object
string - Interface on which this action occurred.
73 74 75 |
# File 'lib/files.com/models/action.rb', line 73 def interface @attributes[:interface] end |
#ip ⇒ Object
string - IP Address that performed this action
38 39 40 |
# File 'lib/files.com/models/action.rb', line 38 def ip @attributes[:ip] end |
#path ⇒ Object
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 |
#source ⇒ Object
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 |
#targets ⇒ Object
array(object) - Targets
48 49 50 |
# File 'lib/files.com/models/action.rb', line 48 def targets @attributes[:targets] end |
#user_id ⇒ Object
int64 - User ID
53 54 55 |
# File 'lib/files.com/models/action.rb', line 53 def user_id @attributes[:user_id] end |
#username ⇒ Object
string - Username
58 59 60 |
# File 'lib/files.com/models/action.rb', line 58 def username @attributes[:username] end |
#when ⇒ Object
date-time - Action occurrence date/time
23 24 25 |
# File 'lib/files.com/models/action.rb', line 23 def when @attributes[:when] end |