Class: Progstr::Filer::FileLike
- Inherits:
-
Object
- Object
- Progstr::Filer::FileLike
- Defined in:
- lib/filer/attachment.rb
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(json) ⇒ FileLike
constructor
A new instance of FileLike.
- #path ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(json) ⇒ FileLike
Returns a new instance of FileLike.
4 5 6 |
# File 'lib/filer/attachment.rb', line 4 def initialize(json) @values = MultiJson.decode(json) end |
Instance Method Details
#id ⇒ Object
8 9 10 |
# File 'lib/filer/attachment.rb', line 8 def id @values["id"] end |
#path ⇒ Object
12 13 14 |
# File 'lib/filer/attachment.rb', line 12 def path @values["name"] end |
#size ⇒ Object
16 17 18 |
# File 'lib/filer/attachment.rb', line 16 def size @values["size"] end |