Description Usage Arguments Value Fields Intended use of this class Author(s) References See Also Examples
View source: R/GitVersion.S3.r
Class representing git versions (S3) and its constructor function.
1 2 3 | GitVersion.S3(.x, version = character(), remote_name = "origin",
remote_url = character(), user_email = character(),
user_name = character(), home = Sys.getenv("HOME"))
|
.x |
|
Instance of class GitVersion.S3
.
version
character
. Version.
remote_name
character
. Name of remote repository.
remote_url
character
. URL of remote repository.
user_email
character
. User e-mail.
user_name
character
. User name.
home
character
. User home directory.
This S3 class, or to be more precise its constructor function, exists mainly
for rapid prototyping purposes.
This is mainly reflected in the fact, that when specifying .x
, this
constructor function will simply update the class
attribute of
whatever object has been provided.
However, it also allows for a more formal OOP-style of rapid
prototyping by offering explicit class fields (all arguments except
.x
). Nevertheless, it is probably advisable to switch to an
explicit formal approach such as S4 and/or Reference Classes
once the package or application has reached a certain state of maturity.
Janko Thyson janko.thyson@gmail.com
http://github.com/jankothyson/bumpr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
## Informal use (intended mainly for rapid prototyping) //
## Takes *any* object and simply changes the class attributes
GitVersion.S3("0.1.1")
GitVersion.S3(rep("0.1.1", 3))
GitVersion.S3(as.list(rep("0.1.1", 3)))
GitVersion.S3(TRUE)
## Formal use (explicitly using 'fields') //
GitVersion.S3()
GitVersion.S3(
version = "0.1.1",
remote_name = "origin",
remote_url = "https://github.com/Rappster/bumpr",
user_email = "janko.thyson@rappster.de",
user_name = "Janko Thyson",
home = Sys.getenv("HOME")
)
## Recommended: inlcude namespace //
## Regardless if you plan on using this class in an informal or formal way
bumpr::GitVersion.S3("0.1.1")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.