Skip to content

Commit a62f149

Browse files
committed
successful cargo build?
1 parent c01ada8 commit a62f149

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

src/lib.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,30 @@ use inflector::Inflector;
1515
declare_types! {
1616
reopen class RubyString {
1717
def to_snake_case(self) -> String {
18-
self.to_string().to_snake_case();
18+
self.to_string().to_snake_case()
1919
}
2020

2121
def to_camel_case(self) -> String {
22-
self.to_string().to_camel_case();
22+
self.to_string().to_camel_case()
2323
}
2424

2525
def to_class_case(self) -> String {
26-
self.to_string().to_class_case();
26+
self.to_string().to_class_case()
2727
}
2828

2929
def to_kebab_case(self) -> String {
30-
self.to_string().to_kebab_case();
30+
self.to_string().to_kebab_case()
3131
}
3232
}
3333
}
34+
35+
36+
// TODO: Helix is eventually going to implement this
37+
use helix::{UncheckedValue, ToRust};
38+
39+
impl ToString for RubyString {
40+
fn to_string(&self) -> String {
41+
let checked = self.0.to_checked().unwrap();
42+
checked.to_rust()
43+
}
44+
}

0 commit comments

Comments
 (0)