Module: FreebaseImporters::CommonAccessors
- Defined in:
- lib/freebase_importers/common_accessors.rb
Class Method Summary collapse
Class Method Details
.deep(key, internal_key) ⇒ Object
8 9 10 |
# File 'lib/freebase_importers/common_accessors.rb', line 8 def deep(key, internal_key) -> { data[key.to_s].collect {|d| d[internal_key.to_s] } } end |
.deep_singular(key, internal_key) ⇒ Object
12 13 14 |
# File 'lib/freebase_importers/common_accessors.rb', line 12 def deep_singular(key, internal_key) -> { data[key.to_s].collect {|d| d[internal_key.to_s] }.first } end |
.single(key) ⇒ Object
4 5 6 |
# File 'lib/freebase_importers/common_accessors.rb', line 4 def single(key) -> { data[key.to_s] } end |