Class: Hitman::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/hitman/target.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, host) ⇒ Target

Returns a new instance of Target.



5
6
7
8
9
10
11
# File 'lib/hitman/target.rb', line 5

def initialize(name, host)
  @name = name
  @host = host
  @prefix = ''
  @postfix = ''
  @routes = []
end

Instance Attribute Details

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/hitman/target.rb', line 3

def host
  @host
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/hitman/target.rb', line 3

def name
  @name
end

#postfixObject

Returns the value of attribute postfix.



3
4
5
# File 'lib/hitman/target.rb', line 3

def postfix
  @postfix
end

#prefixObject

Returns the value of attribute prefix.



3
4
5
# File 'lib/hitman/target.rb', line 3

def prefix
  @prefix
end

#routesObject

Returns the value of attribute routes.



3
4
5
# File 'lib/hitman/target.rb', line 3

def routes
  @routes
end

Instance Method Details

#to_sObject



13
14
15
16
17
# File 'lib/hitman/target.rb', line 13

def to_s
  "Analysis for #{name}\n" +
  "-------------" + "-" * name.length + "\n" +
  routes.join("\n")
end