時々、次のようないくつかのメソッドを書くことになります:
module XyzGateway
module Defaults
def pull_sample asynch=true
'N/A'
end
def is_pull_available?
false
end
def is_push_available?
true
end
def connect params
logger.debug "Invalid gateway(#{self.id}), could not resolve its type. #{ap self}"
end
def gateway_init
end
def disconnect
end
end
end
def
そのような場合にこれらとend
キーワードを回避する方法を探しているだけですが、何か方法はありますか? def
上記の私の場合、これらはデフォルトの動作であり、これらを回避できれば幸いですend
。
編集: はい、実際には、これらすべてのモジュール XyzGateway::Defaults があります。