class YDIM::Html::Util::Server

Constants

SESSION
VALIDATOR

Public Class Methods

new(server) click to toggle source
Calls superclass method
# File lib/ydim/html/util/server.rb, line 17
def initialize(server)
        @server = server
        @private_key = OpenSSL::PKey::DSA.new(File.read(Html.config.root_key))
        @system = YDIM::Client.new(Html.config)
        super(@system)
end

Public Instance Methods

login(email, pass_hash) click to toggle source
# File lib/ydim/html/util/server.rb, line 23
def login(email, pass_hash)
        (email == Html.config.email) && (pass_hash == Html.config.md5_pass)
end
method_missing(meth, *args) click to toggle source
# File lib/ydim/html/util/server.rb, line 26
def method_missing(meth, *args)
        @system.login(@server, @private_key)
        begin
                @system.send(meth, *args)
        ensure
                @system.logout
        end
end