module TMP::DSLCore
Public Instance Methods
method_missing( method, *args, &block )
click to toggle source
# File lib/tmp/deprecated/dsl.rb, line 13 def method_missing( method, *args, &block ) if method.to_s.reverse[0] == '=' target_obj.__send__ :write, method.to_s.reverse.sub('=','').reverse, args.first return args.first else unless block.nil? return target_obj.__send__ :block, method, *args, &block else if method =~ /^\w+__path__$/ return target_obj.__send__ :path, method.to_s.sub!( /__path__$/,"" ),*args else return target_obj.__send__ :read, method end end end end
target_obj(obj=nil)
click to toggle source
# File lib/tmp/deprecated/dsl.rb, line 6 def target_obj obj=nil @target_obj= obj unless obj.nil? @target_obj || ::TMP end