Class: RokuBuilder::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/roku_builder/device_manager.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#ipObject

Returns the value of attribute ip.



98
99
100
# File 'lib/roku_builder/device_manager.rb', line 98

def ip
  @ip
end

#nameObject

Returns the value of attribute name.



98
99
100
# File 'lib/roku_builder/device_manager.rb', line 98

def name
  @name
end

#passwordObject

Returns the value of attribute password.



98
99
100
# File 'lib/roku_builder/device_manager.rb', line 98

def password
  @password
end

#userObject

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_sObject



107
108
109
# File 'lib/roku_builder/device_manager.rb', line 107

def to_s
  "#{name}:#{ip}"
end