R/is_functions.R

Defines functions is_bottled is_fermented is_stirred is_mashed is_spiced is_brew

Documented in is_bottled is_brew is_fermented is_mashed is_spiced is_stirred

#' Brew types
#'
#' Functions to help identify what stage a brew is in.
#'
#' @param x a brew object
#'
#' @return a logical value
#'
#' @export
is_brew <- function(x){
  inherits(x, 'ipa_brew')
}

#' @rdname is_brew
#' @export
is_spiced <- function(x){
  attr(x, 'spiced') %||% FALSE
}

#' @rdname is_brew
#' @export
is_mashed <- function(x){
  attr(x, 'mashed') %||% FALSE
}

#' @rdname is_brew
#' @export
is_stirred <- function(x){
  attr(x, 'stirred') %||% FALSE
}

#' @rdname is_brew
#' @export
is_fermented <- function(x){
  attr(x, 'fermented') %||% FALSE
}

#' @rdname is_brew
#' @export
is_bottled <- function(x){
  attr(x, 'bottled') %||% FALSE
}
bcjaeger/ipa documentation built on May 7, 2020, 9:45 a.m.