Class: Hitman::Target
- Inherits:
-
Object
- Object
- Hitman::Target
- Defined in:
- lib/hitman/target.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#name ⇒ Object
Returns the value of attribute name.
-
#postfix ⇒ Object
Returns the value of attribute postfix.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#routes ⇒ Object
Returns the value of attribute routes.
Instance Method Summary collapse
-
#initialize(name, host) ⇒ Target
constructor
A new instance of Target.
- #to_s ⇒ Object
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
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/hitman/target.rb', line 3 def host @host end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/hitman/target.rb', line 3 def name @name end |
#postfix ⇒ Object
Returns the value of attribute postfix.
3 4 5 |
# File 'lib/hitman/target.rb', line 3 def postfix @postfix end |
#prefix ⇒ Object
Returns the value of attribute prefix.
3 4 5 |
# File 'lib/hitman/target.rb', line 3 def prefix @prefix end |
#routes ⇒ Object
Returns the value of attribute routes.
3 4 5 |
# File 'lib/hitman/target.rb', line 3 def routes @routes end |
Instance Method Details
#to_s ⇒ Object
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 |