Class: KPM::Blob
- Inherits:
-
Object
- Object
- KPM::Blob
- Defined in:
- lib/kpm/blob.rb
Instance Method Summary collapse
-
#initialize(value, tmp_dir) ⇒ Blob
constructor
A new instance of Blob.
-
#value ⇒ Object
On Macos systems, this will require defining a ‘secure_file_priv` config:.
Constructor Details
#initialize(value, tmp_dir) ⇒ Blob
Returns a new instance of Blob.
5 6 7 8 9 |
# File 'lib/kpm/blob.rb', line 5 def initialize(value, tmp_dir) @tmp_dir = tmp_dir @blob_file = @tmp_dir + File::SEPARATOR + rand.to_s store_value(value) end |
Instance Method Details
#value ⇒ Object
On Macos systems, this will require defining a ‘secure_file_priv` config:
e.g /usr/local/etc/my.cnf :
- mysqld
-
… secure_file_priv=“”
17 18 19 |
# File 'lib/kpm/blob.rb', line 17 def value "LOAD_FILE(\"#{@blob_file}\")" end |