Class: Progstr::Filer::FileLike

Inherits:
Object
  • Object
show all
Defined in:
lib/filer/attachment.rb

Instance Method Summary collapse

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

#idObject



8
9
10
# File 'lib/filer/attachment.rb', line 8

def id
  @values["id"]
end

#pathObject



12
13
14
# File 'lib/filer/attachment.rb', line 12

def path
  @values["name"]
end

#sizeObject



16
17
18
# File 'lib/filer/attachment.rb', line 16

def size
  @values["size"]
end