From 1745585fb8aa17f61b297c5e1da63ad52ac83c40 Mon Sep 17 00:00:00 2001 From: Adrien Waksberg Date: Thu, 20 Oct 2016 08:51:59 +0200 Subject: [PATCH] remove unused contructor variables --- bin/mpw-add | 2 +- bin/mpw-config | 2 +- bin/mpw-delete | 2 +- bin/mpw-export | 2 +- bin/mpw-import | 2 +- bin/mpw-list | 2 +- bin/mpw-update | 2 +- bin/mpw-wallet | 2 +- lib/mpw/cli.rb | 6 +----- 9 files changed, 9 insertions(+), 13 deletions(-) diff --git a/bin/mpw-add b/bin/mpw-add index 883f75d..1e09e07 100644 --- a/bin/mpw-add +++ b/bin/mpw-add @@ -44,7 +44,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) cli.get_wallet(options[:wallet]) cli.decrypt diff --git a/bin/mpw-config b/bin/mpw-config index a215150..a1b0743 100644 --- a/bin/mpw-config +++ b/bin/mpw-config @@ -60,7 +60,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, nil, nil) +cli = MPW::Cli.new(config, nil) if not options[:init].nil? cli.setup(options) diff --git a/bin/mpw-delete b/bin/mpw-delete index 7974ff6..3dc0cd7 100644 --- a/bin/mpw-delete +++ b/bin/mpw-delete @@ -52,7 +52,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) opts = { search: options[:pattern], group: options[:group], diff --git a/bin/mpw-export b/bin/mpw-export index 15a9f9b..4a174aa 100644 --- a/bin/mpw-export +++ b/bin/mpw-export @@ -56,7 +56,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) opts = { search: options[:pattern], group: options[:group], diff --git a/bin/mpw-import b/bin/mpw-import index 335ebf4..8881441 100644 --- a/bin/mpw-import +++ b/bin/mpw-import @@ -48,7 +48,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) opts = { search: options[:pattern], group: options[:group], diff --git a/bin/mpw-list b/bin/mpw-list index 984a3b0..2b503cf 100644 --- a/bin/mpw-list +++ b/bin/mpw-list @@ -52,7 +52,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) opts = { search: options[:pattern], group: options[:group], diff --git a/bin/mpw-update b/bin/mpw-update index cab7cbf..7e6519d 100644 --- a/bin/mpw-update +++ b/bin/mpw-update @@ -52,7 +52,7 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) opts = { search: options[:pattern], group: options[:group], diff --git a/bin/mpw-wallet b/bin/mpw-wallet index 7c52f1b..790509f 100644 --- a/bin/mpw-wallet +++ b/bin/mpw-wallet @@ -44,6 +44,6 @@ OptionParser.new do |opts| end.parse! config = MPW::Config.new(options[:config]) -cli = MPW::Cli.new(config, nil, options[:sync], nil) +cli = MPW::Cli.new(config, options[:sync]) cli.list_wallet diff --git a/lib/mpw/cli.rb b/lib/mpw/cli.rb index 8fc109b..e7764f2 100644 --- a/lib/mpw/cli.rb +++ b/lib/mpw/cli.rb @@ -32,13 +32,9 @@ class Cli # Constructor # @args: config -> the config # sync -> boolean for sync or not - # clipboard -> enable clopboard - # otp -> enable otp - def initialize(config, clipboard=true, sync=true, otp=false) + def initialize(config,sync=true) @config = config - @clipboard = clipboard @sync = sync - @otp = otp end # Change a parameter int the config after init