Class: FantasticRobot::Model::Attachment::Base
- Defined in:
- lib/fantastic_robot/model/attachment/base.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#get_file ⇒ Object
Function to get the file attached (if there is any).
Methods inherited from Base
#attributes, #initialize, #to_h
Constructor Details
This class inherits a constructor from FantasticRobot::Model::Base
Instance Method Details
#get_file ⇒ Object
Function to get the file attached (if there is any)
6 7 8 9 10 11 |
# File 'lib/fantastic_robot/model/attachment/base.rb', line 6 def get_file unless (self.file_id.blank?) request = FantasticRobot::Request::GetFile(file_id: self.file_id) response = FantasticRobot::Model::File.new(JSON.parse(request.api_call)) end end |