Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In methods, getting 'self' argument, check 'self' argument #81

Closed
Gerold103 opened this issue Mar 12, 2018 · 1 comment
Closed

In methods, getting 'self' argument, check 'self' argument #81

Gerold103 opened this issue Mar 12, 2018 · 1 comment
Assignees
Labels
good first issue Good for newcomers refactoring Code refactoring

Comments

@Gerold103
Copy link
Collaborator

For example, replicaset.callro must be called as replicaset:callro(...), not replicaset.callro. The first argument in such methods must be checked to be self.

@Gerold103 Gerold103 added good first issue Good for newcomers refactoring Code refactoring labels Mar 12, 2018
@Gerold103 Gerold103 self-assigned this Mar 12, 2018
@Gerold103 Gerold103 changed the title In methods, getting 'self' argument, check this argument In methods, getting 'self' argument, check 'self' argument Mar 19, 2018
@Gerold103 Gerold103 assigned Khatskevich and unassigned Gerold103 May 31, 2018
@Gerold103
Copy link
Collaborator Author

For example see netbox connection call. It raise usage error when called .call instead of :call.

Khatskevich added a commit that referenced this issue Jun 1, 2018
Changes:

1. `check_self_arg` function wrapper added to utils.
Its mechanics:
 * check that the first argument is of table type
 * return result of a real function

2. Check, that self argument is passed to all replicaset and replica
object methods.

Closes: #81
Khatskevich added a commit that referenced this issue Jun 1, 2018
Changes:

1. `check_self_arg` function wrapper added to utils.
Its mechanics:
 * check that the first argument is of table type
 * return result of a real function

2. Check, that self argument is passed to all replicaset and replica
object methods.

Closes: #81
Khatskevich added a commit that referenced this issue Jun 2, 2018
Changes:

1. `check_self_arg` function wrapper added to utils.
Its mechanics:
 * check that the first argument is of table type
 * return result of a real function

2. Check, that self argument is passed to all replicaset and replica
object methods.

Closes: #81
Khatskevich added a commit that referenced this issue Jun 4, 2018
Changes:

1. `check_self_arg` function wrapper added to utils.
Its mechanics:
 * check that the first argument has expected metatable
 * return result of a real function

2. Check, that self argument is passed to all replicaset and replica
object methods.

Closes: #81
Khatskevich added a commit that referenced this issue Jun 4, 2018
Changes:

1. `check_self_arg` function wrapper added to utils.
Its mechanics:
 * check that the first argument has expected metatable
 * return result of a real function

2. Check, that self argument is passed to all replicaset and replica
object methods.

Closes: #81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactoring Code refactoring
Projects
None yet
Development

No branches or pull requests

2 participants