Class: Iudex::DA::ORM::Url

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/iudex-da/models.rb

Overview

Url model (for urls table). Usage note: ORM::setup must be called before this can be loaded.

Constant Summary collapse

VisitURL =
Iudex::Core::VisitURL

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_by_url(vurl) ⇒ Object



48
49
50
51
# File 'lib/iudex-da/models.rb', line 48

def self.find_by_url( vurl )
  vurl = VisitURL.normalize( vurl ) unless vurl.is_a?( VisitURL )
  self[ vurl.uhash ]
end

Instance Method Details

#typeObject

Specifically include type accessors to avoid deprecation warnings for old ruby method.



56
57
58
# File 'lib/iudex-da/models.rb', line 56

def type
  self[ :type ]
end

#type=(t) ⇒ Object



60
61
62
# File 'lib/iudex-da/models.rb', line 60

def type=( t )
  self[ :type ] = t
end

#visit_url=(vurl) ⇒ Object



43
44
45
46
# File 'lib/iudex-da/models.rb', line 43

def visit_url=( vurl )
  vurl = VisitURL.normalize( vurl ) unless vurl.is_a?( VisitURL )
  super( vurl )
end