Module: Bitcoin
- Defined in:
- lib/bitcoin.rb,
lib/bitcoin/version.rb
Defined Under Namespace
Classes: Analyzer, CLI, Candle, Currency, Display, Error, OrderBook, Ssymbol, Ticker, Trade
Constant Summary collapse
- BASE =
Your code goes here…
"https://api.exchange.bitcoin.com/api/2"- VERSION =
"0.1.0"
Class Method Summary collapse
- .get_datetime ⇒ Object
-
.get_datetimes_from_user ⇒ Object
returns 2-element array with datetimes in ISO format.
Class Method Details
.get_datetime ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/bitcoin.rb', line 27 def self.get_datetime puts "Enter Date (YYYY MM DD)" d = gets.strip puts "Enter Time (24-hour format) (hh mm ss)" t = gets.strip d = d.split(" ") t = t.split(" ") r = "#{d[0]}-#{d[1]}-#{d[2]}T#{t[0]}:#{t[1]}:#{t[2]}Z" puts "Is this correct? #{d[0]}/#{d[1]}/#{d[2]}" puts "Y / N" gets.strip.upcase == 'Y' ? r : self.get_datetime end |
.get_datetimes_from_user ⇒ Object
returns 2-element array with datetimes in ISO format
41 42 43 44 45 46 47 |
# File 'lib/bitcoin.rb', line 41 def self.get_datetimes_from_user puts "*** Enter Start Time *** (2014 or later)" from = Bitcoin.get_datetime puts "*** Enter End Time *** (2014 or later)" to = Bitcoin.get_datetime return [from, to] end |