Class: ReminderDomain
- Inherits:
-
Object
- Object
- ReminderDomain
- Defined in:
- lib/reminder/domain.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
readonly
Returns the value of attribute domain.
-
#expiration ⇒ Object
readonly
Returns the value of attribute expiration.
-
#whois_data ⇒ Object
readonly
Returns the value of attribute whois_data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(domain) ⇒ ReminderDomain
constructor
A new instance of ReminderDomain.
Constructor Details
#initialize(domain) ⇒ ReminderDomain
Returns a new instance of ReminderDomain.
6 7 8 9 10 11 12 13 14 |
# File 'lib/reminder/domain.rb', line 6 def initialize(domain) uri = Addressable::URI.heuristic_parse(domain) host = uri.host host.start_with?('www.') ? host[4..-1] : host @domain = host @expiration = expiration @reminder = ReminderDomain.task_from_domain(@domain) @whois_data = nil end |
Instance Attribute Details
#domain ⇒ Object (readonly)
Returns the value of attribute domain.
4 5 6 |
# File 'lib/reminder/domain.rb', line 4 def domain @domain end |
#expiration ⇒ Object (readonly)
Returns the value of attribute expiration.
4 5 6 |
# File 'lib/reminder/domain.rb', line 4 def expiration @expiration end |
#whois_data ⇒ Object (readonly)
Returns the value of attribute whois_data.
4 5 6 |
# File 'lib/reminder/domain.rb', line 4 def whois_data @whois_data end |