Class: Git::Remote::Parser::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/git/remote/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protocol, username, host, owner, repo, html_url) ⇒ Result

Returns a new instance of Result.



9
10
11
12
13
14
15
16
# File 'lib/git/remote/parser.rb', line 9

def initialize(protocol, username, host, owner, repo, html_url)
  @protocol = protocol
  @username = username
  @host = host
  @owner = owner
  @repo = repo
  @html_url = html_url
end

Instance Attribute Details

#hostObject (readonly)

Returns the value of attribute host.



7
8
9
# File 'lib/git/remote/parser.rb', line 7

def host
  @host
end

#html_urlObject (readonly)

Returns the value of attribute html_url.



7
8
9
# File 'lib/git/remote/parser.rb', line 7

def html_url
  @html_url
end

#ownerObject (readonly)

Returns the value of attribute owner.



7
8
9
# File 'lib/git/remote/parser.rb', line 7

def owner
  @owner
end

#protocolObject (readonly)

Returns the value of attribute protocol.



7
8
9
# File 'lib/git/remote/parser.rb', line 7

def protocol
  @protocol
end

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/git/remote/parser.rb', line 7

def repo
  @repo
end

#usernameObject (readonly)

Returns the value of attribute username.



7
8
9
# File 'lib/git/remote/parser.rb', line 7

def username
  @username
end

Instance Method Details

#to_hObject



18
19
20
21
22
23
24
25
26
27
# File 'lib/git/remote/parser.rb', line 18

def to_h
  {
    protocol: protocol,
    username: username,
    host: host,
    owner: owner,
    repo: repo,
    html_url: html_url,
  }
end