lib/mcoin/market/base.rb in mcoin-0.1.0 vs lib/mcoin/market/base.rb in mcoin-0.2.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'pp'
require 'json'
require 'net/http'
module Mcoin
@@ -7,28 +9,9 @@
# :nodoc:
class Base
def initialize(type, currency)
@type = type
@currency = currency
- end
-
- def print
- fetch
- puts '=== Result ==='
- Printer.new(to_ticker).print
- self
- end
-
- def save(option)
- puts '=== InfluxDB ==='
- InfluxDB.new(
- option.endpoint,
- option.database,
- option.username,
- option.password
- ).save([to_ticker.to_influx(market: name)])
- puts 'Saved'
- self
end
def name
self.class.name.split('::').last
end