Commit 71dbd14c authored by nanocryk's avatar nanocryk
Browse files

refractor : renamed to camelCase to match C++ wotb addon

parent 4e093a26
...@@ -38,7 +38,7 @@ declare_types! { ...@@ -38,7 +38,7 @@ declare_types! {
} }
} }
method to_file(call) { method toFile(call) {
let scope = call.scope; let scope = call.scope;
let path = try!(try!(call.arguments.require(scope, 0)).to_string(scope)).value(); let path = try!(try!(call.arguments.require(scope, 0)).to_string(scope)).value();
...@@ -49,7 +49,7 @@ declare_types! { ...@@ -49,7 +49,7 @@ declare_types! {
Ok(JsBoolean::new(scope, result).upcast()) Ok(JsBoolean::new(scope, result).upcast())
} }
method add_node(call) { method addNode(call) {
let scope = call.scope; let scope = call.scope;
let id = call.arguments.this(scope).grab(|wot| { let id = call.arguments.this(scope).grab(|wot| {
...@@ -59,7 +59,7 @@ declare_types! { ...@@ -59,7 +59,7 @@ declare_types! {
Ok(JsInteger::new(scope, *id as i32).upcast()) Ok(JsInteger::new(scope, *id as i32).upcast())
} }
method remove_node(call) { method removeNode(call) {
let scope = call.scope; let scope = call.scope;
let id = call.arguments.this(scope).grab(|wot| { let id = call.arguments.this(scope).grab(|wot| {
...@@ -72,7 +72,7 @@ declare_types! { ...@@ -72,7 +72,7 @@ declare_types! {
Ok(JsInteger::new(scope, id).upcast()) Ok(JsInteger::new(scope, id).upcast())
} }
method get_sentries(call) { method getSentries(call) {
let scope = call.scope; let scope = call.scope;
let arg0 = try!(call.arguments.require(scope, 0)); let arg0 = try!(call.arguments.require(scope, 0));
...@@ -91,7 +91,7 @@ declare_types! { ...@@ -91,7 +91,7 @@ declare_types! {
Ok(jsarray.upcast()) Ok(jsarray.upcast())
} }
method get_non_sentries(call) { method getNonSentries(call) {
let scope = call.scope; let scope = call.scope;
let arg0 = try!(call.arguments.require(scope, 0)); let arg0 = try!(call.arguments.require(scope, 0));
...@@ -110,7 +110,7 @@ declare_types! { ...@@ -110,7 +110,7 @@ declare_types! {
Ok(jsarray.upcast()) Ok(jsarray.upcast())
} }
method disabled(call) { method getDisabled(call) {
let scope = call.scope; let scope = call.scope;
let array = call.arguments.this(scope).grab(|wot| { let array = call.arguments.this(scope).grab(|wot| {
...@@ -126,7 +126,7 @@ declare_types! { ...@@ -126,7 +126,7 @@ declare_types! {
Ok(jsarray.upcast()) Ok(jsarray.upcast())
} }
method get_paths(call) { method getPaths(call) {
let scope = call.scope; let scope = call.scope;
let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
...@@ -152,7 +152,7 @@ declare_types! { ...@@ -152,7 +152,7 @@ declare_types! {
Ok(jsarray.upcast()) Ok(jsarray.upcast())
} }
method size(call) { method getWoTSize(call) {
let scope = call.scope; let scope = call.scope;
let size = call.arguments.this(scope).grab(|wot| { let size = call.arguments.this(scope).grab(|wot| {
...@@ -162,7 +162,7 @@ declare_types! { ...@@ -162,7 +162,7 @@ declare_types! {
Ok(JsInteger::new(scope, size as i32).upcast()) Ok(JsInteger::new(scope, size as i32).upcast())
} }
method is_enabled(call) { method isEnabled(call) {
let scope = call.scope; let scope = call.scope;
let node = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let node = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
...@@ -175,7 +175,7 @@ declare_types! { ...@@ -175,7 +175,7 @@ declare_types! {
} }
} }
method set_enabled(call) { method setEnabled(call) {
let scope = call.scope; let scope = call.scope;
let node = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let node = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
...@@ -189,7 +189,7 @@ declare_types! { ...@@ -189,7 +189,7 @@ declare_types! {
} }
} }
method add_link(call) { method addLink(call) {
let scope = call.scope; let scope = call.scope;
let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
...@@ -205,7 +205,7 @@ declare_types! { ...@@ -205,7 +205,7 @@ declare_types! {
} }
} }
method remove_link(call) { method removeLink(call) {
let scope = call.scope; let scope = call.scope;
let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
...@@ -219,7 +219,7 @@ declare_types! { ...@@ -219,7 +219,7 @@ declare_types! {
} }
} }
method exists_link(call) { method existsLink(call) {
let scope = call.scope; let scope = call.scope;
let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let from = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
...@@ -232,7 +232,7 @@ declare_types! { ...@@ -232,7 +232,7 @@ declare_types! {
Ok(JsBoolean::new(scope, result).upcast()) Ok(JsBoolean::new(scope, result).upcast())
} }
method is_outdistanced(call) { method isOutdistanced(call) {
let scope = call.scope; let scope = call.scope;
let node = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize; let node = try!(try!(call.arguments.require(scope, 0)).check::<JsInteger>()).value() as usize;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment