Class: RokuBuilder::Device
- Inherits:
-
Object
- Object
- RokuBuilder::Device
- Defined in:
- lib/roku_builder/device_manager.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#name ⇒ Object
Returns the value of attribute name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(name, device_config) ⇒ Device
constructor
A new instance of Device.
- #to_s ⇒ Object
Constructor Details
#initialize(name, device_config) ⇒ Device
Returns a new instance of Device.
100 101 102 103 104 105 |
# File 'lib/roku_builder/device_manager.rb', line 100 def initialize(name, device_config) @name = name.to_s @ip = device_config[:ip] @user = device_config[:user] @password = device_config[:password] end |
Instance Attribute Details
#ip ⇒ Object
Returns the value of attribute ip.
98 99 100 |
# File 'lib/roku_builder/device_manager.rb', line 98 def ip @ip end |
#name ⇒ Object
Returns the value of attribute name.
98 99 100 |
# File 'lib/roku_builder/device_manager.rb', line 98 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
98 99 100 |
# File 'lib/roku_builder/device_manager.rb', line 98 def password @password end |
#user ⇒ Object
Returns the value of attribute user.
98 99 100 |
# File 'lib/roku_builder/device_manager.rb', line 98 def user @user end |
Instance Method Details
#to_s ⇒ Object
107 108 109 |
# File 'lib/roku_builder/device_manager.rb', line 107 def to_s "#{name}:#{ip}" end |