Skip to content

Commit 9f69323

Browse files
committed
I liked index properties as an idea but apparently they print badly
1 parent 8c3471e commit 9f69323

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

R/margins.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ margin <- S7::new_class(
1010
constructor = function(t = 0, r = 0, b = 0, l = 0, unit = "pt") {
1111
u <- unit(c(t, r, b, l), unit)
1212
S7::new_object(u)
13-
},
14-
properties = list(
15-
top = property_index(1L),
16-
right = property_index(2L),
17-
bottom = property_index(3L),
18-
left = property_index(4L)
19-
)
13+
}
2014
)
2115

2216
#' @rdname element

R/properties.R

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,3 @@ property_nullable <- function(class = S7::class_any, ...) {
4343
...
4444
)
4545
}
46-
47-
property_index <- function(i) {
48-
force(i)
49-
S7::new_property(
50-
getter = function(self) {
51-
self[i]
52-
},
53-
setter = function(self, value) {
54-
self[i] <- value
55-
self
56-
}
57-
)
58-
}

0 commit comments

Comments
 (0)