Class: GemWatch::CommandOptions
- Inherits:
-
Object
- Object
- GemWatch::CommandOptions
- Defined in:
- lib/gem_watch/command_options.rb
Overview
Command options class for the command line interface. It is initialized with Defaults values.
Constant Summary collapse
- Defaults =
Defaults values for command line interface.
{ # SMTP Part :smtp_host => 'localhost', :smtp_port => 25, # Email part :email_recipients => [], :email_subject => "GemWatch has found something to report", :email_from => "[email protected]", # Checks part :check_update_on => :all, # General part :stdout => true }
Instance Attribute Summary collapse
-
#check_update_on ⇒ Object
Returns the value of attribute check_update_on.
-
#email_from ⇒ Object
Returns the value of attribute email_from.
-
#email_recipients ⇒ Object
Returns the value of attribute email_recipients.
-
#email_subject ⇒ Object
Returns the value of attribute email_subject.
-
#smtp_host ⇒ Object
Returns the value of attribute smtp_host.
-
#smtp_port ⇒ Object
Returns the value of attribute smtp_port.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
Instance Method Summary collapse
-
#initialize ⇒ CommandOptions
constructor
Initialize a new object with Defaults values.
Constructor Details
#initialize ⇒ CommandOptions
Initialize a new object with Defaults values.
31 32 33 |
# File 'lib/gem_watch/command_options.rb', line 31 def initialize Defaults.each {|key, value| send "#{key}=", value} end |
Instance Attribute Details
#check_update_on ⇒ Object
Returns the value of attribute check_update_on.
13 14 15 |
# File 'lib/gem_watch/command_options.rb', line 13 def check_update_on @check_update_on end |
#email_from ⇒ Object
Returns the value of attribute email_from.
10 11 12 |
# File 'lib/gem_watch/command_options.rb', line 10 def email_from @email_from end |
#email_recipients ⇒ Object
Returns the value of attribute email_recipients.
8 9 10 |
# File 'lib/gem_watch/command_options.rb', line 8 def email_recipients @email_recipients end |
#email_subject ⇒ Object
Returns the value of attribute email_subject.
9 10 11 |
# File 'lib/gem_watch/command_options.rb', line 9 def email_subject @email_subject end |
#smtp_host ⇒ Object
Returns the value of attribute smtp_host.
5 6 7 |
# File 'lib/gem_watch/command_options.rb', line 5 def smtp_host @smtp_host end |
#smtp_port ⇒ Object
Returns the value of attribute smtp_port.
6 7 8 |
# File 'lib/gem_watch/command_options.rb', line 6 def smtp_port @smtp_port end |
#stdout ⇒ Object
Returns the value of attribute stdout.
12 13 14 |
# File 'lib/gem_watch/command_options.rb', line 12 def stdout @stdout end |