Class: GitHandler::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/git_handler/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Request

Initialize a new Request instance

Parameters:

  • options (Hash) (defaults to: {})

    request options



31
32
33
34
35
36
37
38
39
40
# File 'lib/git_handler/request.rb', line 31

def initialize(options={})
  @remote_ip = options[:remote_ip]
  @args      = options[:args]
  @env       = options[:env]
  @command   = options[:command]
  @read      = options[:read]
  @write     = options[:write]
  @repo      = options[:repo]
  @repo_path = options[:repo_path]
end

Instance Attribute Details

#argsArray (readonly)

Returns Request arguments.

Returns:

  • (Array)

    Request arguments



9
10
11
# File 'lib/git_handler/request.rb', line 9

def args
  @args
end

#commandString (readonly)

Returns Git command.

Returns:

  • (String)

    Git command



15
16
17
# File 'lib/git_handler/request.rb', line 15

def command
  @command
end

#envHash (readonly)

Returns Request environment.

Returns:

  • (Hash)

    Request environment



12
13
14
# File 'lib/git_handler/request.rb', line 12

def env
  @env
end

#readBoolean (readonly)

Returns Read command flag.

Returns:

  • (Boolean)

    Read command flag



18
19
20
# File 'lib/git_handler/request.rb', line 18

def read
  @read
end

#remote_ipString (readonly)

Returns Remote IP address.

Returns:

  • (String)

    Remote IP address



6
7
8
# File 'lib/git_handler/request.rb', line 6

def remote_ip
  @remote_ip
end

#repoBoolean (readonly)

Returns Git repository name.

Returns:

  • (Boolean)

    Git repository name



24
25
26
# File 'lib/git_handler/request.rb', line 24

def repo
  @repo
end

#repo_pathString (readonly)

Returns Repository path.

Returns:

  • (String)

    Repository path



27
28
29
# File 'lib/git_handler/request.rb', line 27

def repo_path
  @repo_path
end

#writeBoolean (readonly)

Returns Write command flag.

Returns:

  • (Boolean)

    Write command flag



21
22
23
# File 'lib/git_handler/request.rb', line 21

def write
  @write
end