Skip to content

Commit 53539e7

Browse files
authored
update quick start example (#552)
1 parent b677a05 commit 53539e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

book/src/quick-start.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ Let's improve the default implementation by adding a simple class:
7272
# // This is our enhanced implementation
7373
use magnus::{define_module, define_class, function, method, prelude::*, Error, Ruby};
7474
75-
// Define a struct to hold state
75+
// Define a struct to hold state and
76+
// implement Ruby wrapper for the struct
77+
#[magnus::wrap(class = "HelloRusty::Greeter")]
7678
struct Greeter {
7779
name: String,
7880
}
7981
80-
// Implement Ruby wrapper for the struct
81-
#[magnus::wrap(class = "HelloRusty::Greeter")]
8282
impl Greeter {
8383
// Constructor
8484
fn new(name: String) -> Self {

0 commit comments

Comments
 (0)