Sha256: 240327b7645a11661ac54ae71938495d794fd7f950b68b6edade0935241bcece

Contents?: true

Size: 536 Bytes

Versions: 7

Compression:

Stored size: 536 Bytes

Contents

class ConfigurationService

  def self.base_url=(url)
    @base_url = url
  end

  def self.base_url
    return @base_url || "http://news.ycombinator.com/"
  end

  def self.new_url
    return File.join(self.base_url, "newest")
  end

  def self.ask_url
    return File.join(self.base_url, "ask")
  end

  def self.jobs_url
    return File.join(self.base_url, "jobs")
  end

  def self.comments_url
    return File.join(self.base_url, "newcomments")
  end

  def self.submit_url
    return File.join(self.base_url, "submit")
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby-hackernews-1.2.1 lib/ruby-hackernews/services/configuration_service.rb
ruby-hackernews-1.2.0 lib/ruby-hackernews/services/configuration_service.rb
ruby-hackernews-1.1.3 lib/ruby-hackernews/services/configuration_service.rb
ruby-hackernews-1.1.2 lib/ruby-hackernews/services/configuration_service.rb
ruby-hackernews-1.1.1 lib/ruby-hackernews/services/configuration_service.rb
ruby-hackernews-1.1.0 lib/ruby-hackernews/services/configuration_service.rb
ruby-hackernews-1.0.1 lib/ruby-hackernews/services/configuration_service.rb