Class: Dashing::Weather
- Inherits:
-
Thor
- Object
- Thor
- Dashing::Weather
- Includes:
- Thor::Actions
- Defined in:
- lib/dashing/weather.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
-
#name ⇒ Object
Returns the value of attribute name.
-
#woe_id ⇒ Object
Returns the value of attribute woe_id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#format ⇒ Object
Returns the value of attribute format.
9 10 11 |
# File 'lib/dashing/weather.rb', line 9 def format @format end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/dashing/weather.rb', line 7 def name @name end |
#woe_id ⇒ Object
Returns the value of attribute woe_id.
8 9 10 |
# File 'lib/dashing/weather.rb', line 8 def woe_id @woe_id end |
Class Method Details
.source_root ⇒ Object
11 12 13 |
# File 'lib/dashing/weather.rb', line 11 def self.source_root File.('../../templates', __FILE__) end |
Instance Method Details
#install(type, name, woe_id, format) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dashing/weather.rb', line 16 def install(type, name, woe_id, format) @name = Thor::Util.snake_case(name) case type when 'widget' directory :widgets when 'job' @format = format @woe_id = woe_id directory :jobs else puts "invalid install type. Please use widget or job." end end |