Sha256: f72fbc883365ad824a7282b1dba8c968df40afe80871c7db6a1f5ea95f63c9a1

Contents?: true

Size: 190 Bytes

Versions: 5

Compression:

Stored size: 190 Bytes

Contents

class Webpage < MLS::Model

  belongs_to :source
  has_many :tasks, as: :subject

  validates :url, presence: true

  def name
    url.match(/^(?:https?:\/\/)?(?:www\.)?(.*)/)[1]
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mls-1.9.0 lib/mls/models/webpage.rb
mls-1.8.0 lib/mls/models/webpage.rb
mls-1.7.0 lib/mls/models/webpage.rb
mls-1.6.0 lib/mls/models/webpage.rb
mls-1.5.1 lib/mls/webpage.rb