Class: Teams::Api::TaskModuleResponse
- Inherits:
-
Object
- Object
- Teams::Api::TaskModuleResponse
- Defined in:
- lib/teams/api/task_module.rb
Instance Method Summary collapse
-
#initialize(task, cache_info: nil) ⇒ TaskModuleResponse
constructor
A new instance of TaskModuleResponse.
- #to_h ⇒ Object
Constructor Details
#initialize(task, cache_info: nil) ⇒ TaskModuleResponse
Returns a new instance of TaskModuleResponse.
71 72 73 74 |
# File 'lib/teams/api/task_module.rb', line 71 def initialize(task, cache_info: nil) @task = task @cache_info = cache_info end |
Instance Method Details
#to_h ⇒ Object
76 77 78 79 80 |
# File 'lib/teams/api/task_module.rb', line 76 def to_h body = { "task" => @task.respond_to?(:to_h) ? @task.to_h : @task } body["cacheInfo"] = Common::Hashes.deep_stringify_keys(@cache_info) if @cache_info body end |