lib/smile/base.rb in smile-0.4.3 vs lib/smile/base.rb in smile-0.4.4
- old
+ new
@@ -1,22 +1,22 @@
-#
+#
# base.rb
# smile
-#
+#
# Created by Zac Kleinpeter on 2009-04-28.
# Copyright 2009 Cajun Country. All rights reserved.
-#
+#
module Smile
- class Base
+ class Base
include Smile::Common
attr_accessor :attributes
-
+
class << self
include Smile::Common
def configure
- yield( session )
+ yield( session )
end
def clear_config!
session.clear_config!
end
@@ -25,9 +25,13 @@
def initialize( options={} )
@attributes = OpenStruct.new( options )
end
def method_missing( name, *args )
- @attributes.send(name,args)
+ if args.nil?
+ @attributes.send(name,args)
+ else
+ @attributes.send(name)
+ end
end
end
end