Sha256: 327b7a6b7619751fe5609fa38ccc19dccf0b2ce345429667a206aef19c7c7143

Contents?: true

Size: 1.54 KB

Versions: 548

Compression:

Stored size: 1.54 KB

Contents

# frozen_string_literal: true

module Files
  class Action
    attr_reader :options, :attributes

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

    # int64 - Action ID
    def id
      @attributes[:id]
    end

    # string - Path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
    def path
      @attributes[:path]
    end

    # date-time - Action occurrence date/time
    def when
      @attributes[:when]
    end

    # string - The destination path for this action, if applicable
    def destination
      @attributes[:destination]
    end

    # string - Friendly displayed output
    def display
      @attributes[:display]
    end

    # string - IP Address that performed this action
    def ip
      @attributes[:ip]
    end

    # string - The source path for this action, if applicable
    def source
      @attributes[:source]
    end

    # array - Targets
    def targets
      @attributes[:targets]
    end

    # int64 - User ID
    def user_id
      @attributes[:user_id]
    end

    # string - Username
    def username
      @attributes[:username]
    end

    # string - Type of action
    def action
      @attributes[:action]
    end

    # string - Failure type.  If action was a user login or session failure, why did it fail?
    def failure_type
      @attributes[:failure_type]
    end

    # string - Interface on which this action occurred.
    def interface
      @attributes[:interface]
    end
  end
end

Version data entries

548 entries across 548 versions & 1 rubygems

Version Path
files.com-1.0.462 lib/files.com/models/action.rb
files.com-1.0.461 lib/files.com/models/action.rb
files.com-1.0.460 lib/files.com/models/action.rb
files.com-1.0.459 lib/files.com/models/action.rb
files.com-1.0.458 lib/files.com/models/action.rb
files.com-1.0.457 lib/files.com/models/action.rb
files.com-1.0.456 lib/files.com/models/action.rb
files.com-1.0.455 lib/files.com/models/action.rb
files.com-1.0.454 lib/files.com/models/action.rb
files.com-1.0.453 lib/files.com/models/action.rb
files.com-1.0.452 lib/files.com/models/action.rb
files.com-1.0.451 lib/files.com/models/action.rb
files.com-1.0.450 lib/files.com/models/action.rb
files.com-1.0.449 lib/files.com/models/action.rb
files.com-1.0.448 lib/files.com/models/action.rb
files.com-1.0.447 lib/files.com/models/action.rb
files.com-1.0.446 lib/files.com/models/action.rb
files.com-1.0.445 lib/files.com/models/action.rb
files.com-1.0.444 lib/files.com/models/action.rb
files.com-1.0.443 lib/files.com/models/action.rb