Class: ICli::AbstractHost
- Inherits:
-
Object
- Object
- ICli::AbstractHost
- Defined in:
- lib/proutils/icli/abstract_host.rb
Overview
Base class for all hosts.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#uri ⇒ Object
readonly
URI = http:// + domain name TODO Deal with https, and possible other protocols too.
-
#username ⇒ Object
readonly
Many sites will require logging in so these are available by for use even if they arn’t used.
Instance Method Summary collapse
-
#domain ⇒ Object
Domain name of host.
-
#initialize(options) ⇒ AbstractHost
constructor
New RubyForge tasks.
Constructor Details
#initialize(options) ⇒ AbstractHost
New RubyForge tasks.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/proutils/icli/abstract_host.rb', line 41 def initialize() = .dup.rekey @dryrun = [:dryrun] @trace = [:trace] #@domain = options[:domain] || default_domain @uri = URI.parse("http://" + domain) @username = [:username] @password = [:password] mkdir_p(File.dirname(COOKIEJAR)) @cookie_jar = COOKIEJAR end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
33 34 35 |
# File 'lib/proutils/icli/abstract_host.rb', line 33 def password @password end |
#uri ⇒ Object (readonly)
URI = http:// + domain name TODO Deal with https, and possible other protocols too.
28 29 30 |
# File 'lib/proutils/icli/abstract_host.rb', line 28 def uri @uri end |
#username ⇒ Object (readonly)
Many sites will require logging in so these are available by for use even if they arn’t used.
32 33 34 |
# File 'lib/proutils/icli/abstract_host.rb', line 32 def username @username end |
Instance Method Details
#domain ⇒ Object
Domain name of host. Must be overriden by adapter.
36 37 38 |
# File 'lib/proutils/icli/abstract_host.rb', line 36 def domain raise "Missing Domain" end |