Class: Filbunke::File

Inherits:
Object
  • Object
show all
Defined in:
lib/filbunke/file.rb

Constant Summary collapse

PATH_KEY =
'path'
URL_KEY =
'url'
HASH_KEY =
'hash'
STATE_KEY =
'state'

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ File

Returns a new instance of File.



9
10
11
# File 'lib/filbunke/file.rb', line 9

def initialize(json)
  @json = json
end

Instance Method Details

#hashObject



21
22
23
# File 'lib/filbunke/file.rb', line 21

def hash
  @json[HASH_KEY]
end

#pathObject



13
14
15
# File 'lib/filbunke/file.rb', line 13

def path
  @json[PATH_KEY]
end

#stateObject



25
26
27
# File 'lib/filbunke/file.rb', line 25

def state
  @json[STATE_KEY]
end

#urlObject



17
18
19
# File 'lib/filbunke/file.rb', line 17

def url
  @json[URL_KEY]
end