Class: Webspinne::Site
- Inherits:
-
Struct
- Object
- Struct
- Webspinne::Site
- Defined in:
- lib/webspinne/site.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri
2 3 4 |
# File 'lib/webspinne/site.rb', line 2 def uri @uri end |
Instance Method Details
#hostname(test_uri = uri) ⇒ Object
11 12 13 |
# File 'lib/webspinne/site.rb', line 11 def hostname test_uri=uri URI(test_uri).hostname end |
#offsite?(test_uri) ⇒ Boolean
7 8 9 |
# File 'lib/webspinne/site.rb', line 7 def offsite? test_uri !onsite?(test_uri) end |
#onsite?(test_uri) ⇒ Boolean
3 4 5 |
# File 'lib/webspinne/site.rb', line 3 def onsite? test_uri hostname == hostname(test_uri) || hostname(test_uri) == nil end |