Class: Thundersnow::Bin
- Inherits:
-
Object
- Object
- Thundersnow::Bin
- Defined in:
- lib/thundersnow/bin.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Bin
constructor
A new instance of Bin.
- #run ⇒ Object
Constructor Details
#initialize(args) ⇒ Bin
Returns a new instance of Bin.
4 5 6 |
# File 'lib/thundersnow/bin.rb', line 4 def initialize(args) @args = args end |
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/thundersnow/bin.rb', line 8 def run @weather = Weather.new(location) return "Could not locate weather for #{location}" unless @weather.valid? if show_forecast? show :forecast else show :current end end |