Skip to content

Commit

Permalink
milne Roxygen2 docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
bburns632 committed Apr 22, 2024
1 parent bdd09b8 commit fc032cb
Show file tree
Hide file tree
Showing 32 changed files with 2,506 additions and 94 deletions.
3 changes: 1 addition & 2 deletions inst/milne/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ LinkingTo:
Rcpp
License: file LICENSE
LazyData: TRUE
RoxygenNote: 7.1.0
Roxygen: list(r6 = FALSE)
RoxygenNote: 7.3.1
97 changes: 73 additions & 24 deletions inst/milne/R/The_End.R
Original file line number Diff line number Diff line change
@@ -1,39 +1,59 @@
# R6 Class Definitions for testing

#' @title Age One
#' @name One
#' @family TheEnd
#' @description Age One
#' R6 Class Age One
#'
#' @description
#' Age One
#'
#' @details
#' Age One
#'
#' @importFrom R6 R6Class
#' @export
One <- R6::R6Class(
classname = "One",
public = list(

#' @description
#' Create a New Age One Object
#' @return An Age One Object
initialize = function() {
cat("The End, by A. A. Milne \n")
},

#' @description
#' Print poem
print_poem = function() {
cat("When I was One, \n",
"I had just begun. \n"
)
},

#' @description
#' Get Age
how_old_am_i = function() {private$get_age()}
),
private = list(
get_age = function() {.classname(self)}
)
)

#' @title Age Two
#' @name Two
#' @family TheEnd
#' @description Age Two
#' R6 Class Age Two
#'
#' @description
#' Age Two
#'
#' @details
#' Age Two
#'
#' @importFrom R6 R6Class
#' @export
Two <- R6::R6Class(
classname = "Two",
inherit = One,
public = list(
#' @description
#' Print poem two
print_poem = function() {
super$print_poem()
cat("When I was Two, \n",
Expand All @@ -43,17 +63,23 @@ Two <- R6::R6Class(
)
)

#' @title Age Three
#' @name Three
#' @family TheEnd
#' @description Age Three
#' R6 Class Age Three
#'
#' @description
#' Age Three
#'
#' @details
#' Age Three
#'
#' @importFrom R6 R6Class
#' @export
Three <- R6::R6Class(
# R6 classes don't need classname to match generator name
classname = "HardlyThree",
inherit = Two,
public = list(
#' @description
#' Print poem thrice
print_poem = function() {
super$print_poem()
cat("When I was Three, \n",
Expand All @@ -63,17 +89,23 @@ Three <- R6::R6Class(
)
)

#' @title Age Four
#' @name Four
#' @family TheEnd
#' @description Age Four
#' R6 Class Age Four
#'
#' @description
#' Age Four
#'
#' @details
#' Age Four
#'
#' @importFrom R6 R6Class
#' @export
Four <- R6::R6Class(
# R6 classes don't need classname at all
classname = NULL,
inherit = Three,
public = list(
#' @description
#' Print poem four
print_poem = function() {
super$print_poem()
cat("When I was Four, \n",
Expand All @@ -83,16 +115,24 @@ Four <- R6::R6Class(
)
)

#' @title Age Five
#' @name Five
#' @family TheEnd
#' @description Age Five
#' R6 Class Age Five
#'
#' @description
#' Age Five
#'
#' @details
#' Age Five
#'
#' @importFrom R6 R6Class
#' @export
Five <- R6::R6Class(
classname = "Five",
inherit = Four,
public = list(
#' @description
#' Print poem five times
#' @details
#' Did your hand hit on the river?
print_poem = function() {
super$print_poem()
cat("When I was Five, \n",
Expand All @@ -104,16 +144,24 @@ Five <- R6::R6Class(
)
)

#' @title Age Six
#' @name Six
#' @family TheEnd
#' @description Age Six
#' R6 Class Age Six
#'
#' @description
#' Age Six
#'
#' @details
#' Age Six
#'
#' @importFrom R6 R6Class
#' @export
Six <- R6::R6Class(
classname = "Six",
inherit = Five,
public = list(
#' @description
#' Print poem six times
#' @details
#' I should have looked ahead
print_poem = function() {
super$print_poem()
cat("But now I am Six,",
Expand All @@ -123,6 +171,7 @@ Six <- R6::R6Class(
}
),
private = list(
# I don't think private classes and methods are supported by Roxygen2
print_ending = function() {
cat("So I think I'll be six now",
"for ever and ever."
Expand Down
93 changes: 93 additions & 0 deletions inst/milne/docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions inst/milne/docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fc032cb

Please sign in to comment.