lib/ratebeer/beer.rb
def doc
        unless instance_variable_defined?('@doc')
          @doc = noko_doc(URI.join(BASE_URL, beer_url(id)))
          validate_beer
          scrape_name # Name must be scraped before any possible redirection.
          @doc = redirect_if_alias(@doc) || @doc
        end
        @doc
      end
# Each key represents an item of data accessible for each beer. The
# included scraping module defines dynamically a series of methods for
# accessing this data.
#
Each key represents an item of data accessible for each beer. The
included scraping module defines dynamically a series of methods for
accessing this data.
Each key represents an item of data accessible for each beer . The included scraping module defines dynamically a series of methods for accessing this data .
def doc
        unless instance_variable_defined?('@doc')
          @doc = noko_doc(URI.join(BASE_URL, beer_url(id)))
          validate_beer
          scrape_name 
          @doc = redirect_if_alias(@doc) || @doc
        end
        @doc
      end
def doc unless instance_variable_defined? ( '@doc' ) @doc = noko_doc ( URI . join ( BASE_URL , beer_url ( id ) ) ) validate_beer scrape_name @doc = redirect_if_alias ( @doc ) || @doc end @doc end
Each key represents an item of data accessible for each beer.
Each key represents an item of data accessible for each beer .
# Name must be scraped before any possible redirection.