lib/roku_builder/util.rb in roku_builder-3.3.4 vs lib/roku_builder/util.rb in roku_builder-3.4.0
- old
+ new
@@ -7,21 +7,25 @@
# Common initializer of device utils
# @param ip [String] IP address of roku device
# @param user [String] Username for roku device
# @param password [String] Password for roku device
- def initialize(ip:, user:, password:, logger:)
+ def initialize(ip:, user:, password:, logger:, init_params: nil)
@device_config = {
ip: ip,
user: user,
password: password
}
@roku_ip_address = ip
@dev_username = user
@dev_password = password
@url = "http://#{@roku_ip_address}"
@logger = logger
- init()
+ if init_params
+ init(**init_params)
+ else
+ init
+ end
end
# Second initializer to be overwriten
def init
#Override in subclass