lib/chatwork/operations.rb in chatwork-0.0.3 vs lib/chatwork/operations.rb in chatwork-0.0.5

- old
+ new

@@ -1,8 +1,17 @@ module ChatWork module Operations def install_class_operations(*operations) define_create if operations.include?(:create) + define_get if operations.include?(:get) + end + + def define_get + instance_eval do + def get(params = {}) + convert(ChatWork.client.get(path, params)) + end + end end def define_create instance_eval do def create(params = {})