Class: Slot
- Inherits:
-
Object
- Object
- Slot
- Defined in:
- lib/galaxy.rb
Overview
Slot Information
Instance Attribute Summary collapse
-
#binary ⇒ Object
readonly
Returns the value of attribute binary.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(id, name, url, binary, config, status) ⇒ Slot
constructor
A new instance of Slot.
- #print_col ⇒ Object
Constructor Details
#initialize(id, name, url, binary, config, status) ⇒ Slot
Returns a new instance of Slot.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/galaxy.rb', line 20 def initialize(id, name, url, binary, config, status) @id = id @name = name @url = url @binary = binary @config = config @status = status uri = URI.parse(url) @host = uri.host @ip = IPSocket::getaddress(host) end |
Instance Attribute Details
#binary ⇒ Object (readonly)
Returns the value of attribute binary.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def binary @binary end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def config @config end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def host @host end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def id @id end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def ip @ip end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def name @name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def status @status end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
18 19 20 |
# File 'lib/galaxy.rb', line 18 def url @url end |
Instance Method Details
#print_col ⇒ Object
32 33 34 |
# File 'lib/galaxy.rb', line 32 def print_col puts "#{id}\t#{host}\t#{name}\t#{status}\t#{binary}\t#{config}" end |