Class: Backup::LoadFromFiles::DataFile
- Inherits:
-
Object
- Object
- Backup::LoadFromFiles::DataFile
show all
- Defined in:
- lib/backup/load_from_files.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(json_content) ⇒ DataFile
Returns a new instance of DataFile.
16
17
18
|
# File 'lib/backup/load_from_files.rb', line 16
def initialize(json_content)
@content = json_content
end
|
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
14
15
16
|
# File 'lib/backup/load_from_files.rb', line 14
def content
@content
end
|
Instance Method Details
#full_hash ⇒ Object
28
29
30
|
# File 'lib/backup/load_from_files.rb', line 28
def full_hash
@content.hash
end
|
#table_name ⇒ Object
20
21
22
|
# File 'lib/backup/load_from_files.rb', line 20
def table_name
@content.match(/"table_name":\s?"(\w+)"/)[1]
end
|
#table_name_sym ⇒ Object
24
25
26
|
# File 'lib/backup/load_from_files.rb', line 24
def table_name_sym
table_name.to_sym
end
|