Class: FantasticRobot::Model::File

Inherits:
Base
  • Object
show all
Defined in:
lib/fantastic_robot/model/file.rb

Overview

This object represents a file.

Constant Summary

Constants inherited from Base

Base::FIELD_CONVERSIONS

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#attributes, #initialize, #to_h

Constructor Details

This class inherits a constructor from FantasticRobot::Model::Base

Instance Attribute Details

#file_idObject

Returns the value of attribute file_id.



5
6
7
# File 'lib/fantastic_robot/model/file.rb', line 5

def file_id
  @file_id
end

#file_pathObject

Returns the value of attribute file_path.



5
6
7
# File 'lib/fantastic_robot/model/file.rb', line 5

def file_path
  @file_path
end

#file_sizeObject

Returns the value of attribute file_size.



5
6
7
# File 'lib/fantastic_robot/model/file.rb', line 5

def file_size
  @file_size
end

Class Method Details

.fileObject



10
11
12
# File 'lib/fantastic_robot/model/file.rb', line 10

def self.file
  FantasticRobot.connection.get_by_path(self.file_path) unless self.file_path.blank?
end