Fix store handle class name to fit convention
This commit is contained in:
parent
0884b337c9
commit
1aaf0c4d30
3 changed files with 24 additions and 24 deletions
|
@ -55,10 +55,10 @@ impl FileLockEntryHandle {
|
||||||
}
|
}
|
||||||
|
|
||||||
wrappable_struct!(FileLockEntryHandle, FileLockEntryWrapper, FLE_WRAPPER);
|
wrappable_struct!(FileLockEntryHandle, FileLockEntryWrapper, FLE_WRAPPER);
|
||||||
class!(RFileLockEntry);
|
class!(RFileLockEntryHandle);
|
||||||
impl_unwrap!(RFileLockEntry, FileLockEntryHandle, FLE_WRAPPER);
|
|
||||||
impl_wrap!(FileLockEntryHandle, FLE_WRAPPER);
|
impl_wrap!(FileLockEntryHandle, FLE_WRAPPER);
|
||||||
impl_verified_object!(RFileLockEntry);
|
impl_unwrap!(RFileLockEntryHandle, FileLockEntryHandle, FLE_WRAPPER);
|
||||||
|
impl_verified_object!(RFileLockEntryHandle);
|
||||||
|
|
||||||
/// Helper macro for operating on RUBY_STORE_CACHE object
|
/// Helper macro for operating on RUBY_STORE_CACHE object
|
||||||
///
|
///
|
||||||
|
@ -119,7 +119,7 @@ macro_rules! call_on_fle_from_store {
|
||||||
|
|
||||||
|
|
||||||
methods!(
|
methods!(
|
||||||
RFileLockEntry,
|
RFileLockEntryHandle,
|
||||||
itself,
|
itself,
|
||||||
|
|
||||||
fn r_get_location() -> AnyObject {
|
fn r_get_location() -> AnyObject {
|
||||||
|
@ -252,7 +252,7 @@ class!(REntry);
|
||||||
impl_unwrap!(REntry, Entry, ENTRY_WRAPPER);
|
impl_unwrap!(REntry, Entry, ENTRY_WRAPPER);
|
||||||
|
|
||||||
pub fn setup_filelockentry() -> Class {
|
pub fn setup_filelockentry() -> Class {
|
||||||
let mut class = Class::new("RFileLockEntry", None);
|
let mut class = Class::new("RFileLockEntryHandle", None);
|
||||||
class.define(|itself| {
|
class.define(|itself| {
|
||||||
itself.def("location", r_get_location);
|
itself.def("location", r_get_location);
|
||||||
itself.def("header" , r_get_header);
|
itself.def("header" , r_get_header);
|
||||||
|
|
|
@ -31,14 +31,14 @@ use util::Wrap;
|
||||||
use util::Unwrap;
|
use util::Unwrap;
|
||||||
|
|
||||||
use storeid::RStoreId;
|
use storeid::RStoreId;
|
||||||
use entry::RFileLockEntry;
|
use entry::RFileLockEntryHandle;
|
||||||
use cache::StoreHandle;
|
use cache::StoreHandle;
|
||||||
|
|
||||||
wrappable_struct!(StoreHandle, StoreWrapper, STORE_WRAPPER);
|
wrappable_struct!(StoreHandle, StoreWrapper, STORE_WRAPPER);
|
||||||
class!(RStore);
|
class!(RStoreHandle);
|
||||||
impl_wrap!(StoreHandle, STORE_WRAPPER);
|
impl_wrap!(StoreHandle, STORE_WRAPPER);
|
||||||
impl_unwrap!(RStore, StoreHandle, STORE_WRAPPER);
|
impl_unwrap!(RStoreHandle, StoreHandle, STORE_WRAPPER);
|
||||||
impl_verified_object!(RStore);
|
impl_verified_object!(RStoreHandle);
|
||||||
|
|
||||||
macro_rules! call_on_store_by_handle {
|
macro_rules! call_on_store_by_handle {
|
||||||
{
|
{
|
||||||
|
@ -141,7 +141,7 @@ macro_rules! call_on_store {
|
||||||
}
|
}
|
||||||
|
|
||||||
methods!(
|
methods!(
|
||||||
RStore,
|
RStoreHandle,
|
||||||
itself,
|
itself,
|
||||||
|
|
||||||
// Build a new Store object, return a handle to it.
|
// Build a new Store object, return a handle to it.
|
||||||
|
@ -403,7 +403,7 @@ methods!(
|
||||||
// On success: Nil
|
// On success: Nil
|
||||||
// On error: Nil + Exception
|
// On error: Nil + Exception
|
||||||
//
|
//
|
||||||
fn update(fle: RFileLockEntry) -> NilClass {
|
fn update(fle: RFileLockEntryHandle) -> NilClass {
|
||||||
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
||||||
|
|
||||||
call_on_store! {
|
call_on_store! {
|
||||||
|
@ -450,7 +450,7 @@ methods!(
|
||||||
// On success: Nil
|
// On success: Nil
|
||||||
// On error: Nil + Exception
|
// On error: Nil + Exception
|
||||||
//
|
//
|
||||||
fn save_to(fle: RFileLockEntry, sid: RStoreId) -> NilClass {
|
fn save_to(fle: RFileLockEntryHandle, sid: RStoreId) -> NilClass {
|
||||||
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
||||||
let sid = typecheck!(sid).unwrap().clone();
|
let sid = typecheck!(sid).unwrap().clone();
|
||||||
|
|
||||||
|
@ -475,7 +475,7 @@ methods!(
|
||||||
// On success: Nil
|
// On success: Nil
|
||||||
// On error: Nil + Exception
|
// On error: Nil + Exception
|
||||||
//
|
//
|
||||||
fn save_as(fle: RFileLockEntry, sid: RStoreId) -> NilClass {
|
fn save_as(fle: RFileLockEntryHandle, sid: RStoreId) -> NilClass {
|
||||||
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
let fle = typecheck!(fle).unwrap().fle_handle().clone();
|
||||||
let sid = typecheck!(sid).unwrap().clone();
|
let sid = typecheck!(sid).unwrap().clone();
|
||||||
|
|
||||||
|
@ -540,7 +540,7 @@ methods!(
|
||||||
);
|
);
|
||||||
|
|
||||||
pub fn setup() -> Class {
|
pub fn setup() -> Class {
|
||||||
let mut class = Class::new("RStore", None);
|
let mut class = Class::new("RStoreHandle", None);
|
||||||
class.define(|itself| {
|
class.define(|itself| {
|
||||||
itself.def_self("new" , new);
|
itself.def_self("new" , new);
|
||||||
itself.def("create" , create);
|
itself.def("create" , create);
|
||||||
|
|
|
@ -37,13 +37,13 @@ end
|
||||||
puts "---"
|
puts "---"
|
||||||
|
|
||||||
works "RStoreId.new_baseless" , (not RStoreId.new_baseless("test").nil?)
|
works "RStoreId.new_baseless" , (not RStoreId.new_baseless("test").nil?)
|
||||||
works "RStore.respond_to? :new" , (RStore.respond_to? :new)
|
works "RStoreHandle.respond_to? :new" , (RStoreHandle.respond_to? :new)
|
||||||
works "RStore.instance_methods.include? :create" , (RStore.instance_methods.include? :create)
|
works "RStoreHandle.instance_methods.include? :create" , (RStoreHandle.instance_methods.include? :create)
|
||||||
works "RStore.instance_methods.include? :get" , (RStore.instance_methods.include? :get)
|
works "RStoreHandle.instance_methods.include? :get" , (RStoreHandle.instance_methods.include? :get)
|
||||||
works "RStore.instance_methods.include? :retrieve" , (RStore.instance_methods.include? :retrieve)
|
works "RStoreHandle.instance_methods.include? :retrieve" , (RStoreHandle.instance_methods.include? :retrieve)
|
||||||
works "RStore.instance_methods.include? :delete" , (RStore.instance_methods.include? :delete)
|
works "RStoreHandle.instance_methods.include? :delete" , (RStoreHandle.instance_methods.include? :delete)
|
||||||
works "RStore.instance_methods.include? :update" , (RStore.instance_methods.include? :update)
|
works "RStoreHandle.instance_methods.include? :update" , (RStoreHandle.instance_methods.include? :update)
|
||||||
works "RStore.instance_methods.include? :move_by_id" , (RStore.instance_methods.include? :move_by_id)
|
works "RStoreHandle.instance_methods.include? :move_by_id" , (RStoreHandle.instance_methods.include? :move_by_id)
|
||||||
works "RStore.instance_methods.include? :save_as" , (RStore.instance_methods.include? :save_as)
|
works "RStoreHandle.instance_methods.include? :save_as" , (RStoreHandle.instance_methods.include? :save_as)
|
||||||
works "RStore.instance_methods.include? :save_to" , (RStore.instance_methods.include? :save_to)
|
works "RStoreHandle.instance_methods.include? :save_to" , (RStoreHandle.instance_methods.include? :save_to)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue