flauschbaellchen / atheme-ruby Goto Github PK
View Code? Open in Web Editor NEWProvides a ruby interface for Atheme's XMLRPC API
License: MIT License
Provides a ruby interface for Atheme's XMLRPC API
License: MIT License
Currently all service-calls are simple fallbacks to a #method_missing which handles the call to the API.
In addition the parser-blocks are called with #instance_eval.
This is slow and not really a code someone would really love.
Solution:
Get rid of it and implement all methods to the respective service-classes.
Use method_missing only as the last fallback.
This will allow us to:
If you change one or more attributes of an entity, e.g. a channel, it won't be synced with the object itself.
Example:
@session.chanserv.info("#opers") do |channel|
channel.url #=> nil
channel.url!("www.example.com") #=> Sets an url for the channel
channel.url #=> nil
end
# or
channel = @session.chanserv.info("#opers")
channel.url #=> nil
channel.url!("www.example.com")
channel.url #=> nil
# but (as the object is fetched and initialized again):
@session.chanserv.info("#opers").url #=> nil
@session.chanserv.info("#opers").url!("www.example.com")
@session.chanserv.info("#opers").url #=> www.example.com
Sure, there are some workarounds which would fix this..
But they would mess up the code.
I'll leave it as it is until I have a really good idea or decide to put up one of the workarounds. (Ideas welcome!)
Allow developers to assign hooks to particular methods like:
hook_on :chanserv, :info do
log "Someone asked for the info of channel X"
end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.