Class: Arbitrage::CLI
- Inherits:
-
Object
- Object
- Arbitrage::CLI
- Defined in:
- lib/arbitrage/cli.rb
Overview
CLI Controller
Instance Attribute Summary collapse
-
#market_value ⇒ Object
Returns the value of attribute market_value.
-
#product ⇒ Object
Returns the value of attribute product.
-
#profit ⇒ Object
Returns the value of attribute profit.
-
#validator ⇒ Object
Returns the value of attribute validator.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
Instance Attribute Details
#market_value ⇒ Object
Returns the value of attribute market_value.
3 4 5 |
# File 'lib/arbitrage/cli.rb', line 3 def market_value @market_value end |
#product ⇒ Object
Returns the value of attribute product.
3 4 5 |
# File 'lib/arbitrage/cli.rb', line 3 def product @product end |
#profit ⇒ Object
Returns the value of attribute profit.
3 4 5 |
# File 'lib/arbitrage/cli.rb', line 3 def profit @profit end |
#validator ⇒ Object
Returns the value of attribute validator.
3 4 5 |
# File 'lib/arbitrage/cli.rb', line 3 def validator @validator end |
Instance Method Details
#call ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/arbitrage/cli.rb', line 11 def call puts "What's your zipcode?" self.product.get_zipcode self.product.get_product puts "Details on the product you've selected:" puts "______________________________________" puts self.product.display_product_details puts "______________________________________" self.profit.list_opportunity #puts "your potential profit on the sale of #{self.product.name} is $#{gross_profit}" end |