Class: Contentful::Exporter::Drupal::User
- Inherits:
-
Object
- Object
- Contentful::Exporter::Drupal::User
- Defined in:
- lib/drupal/user.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#exporter ⇒ Object
readonly
Returns the value of attribute exporter.
Instance Method Summary collapse
-
#initialize(exporter, config) ⇒ User
constructor
A new instance of User.
- #save_users_as_json ⇒ Object
Constructor Details
#initialize(exporter, config) ⇒ User
Returns a new instance of User.
8 9 10 |
# File 'lib/drupal/user.rb', line 8 def initialize(exporter, config) @exporter, @config = exporter, config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
6 7 8 |
# File 'lib/drupal/user.rb', line 6 def config @config end |
#exporter ⇒ Object (readonly)
Returns the value of attribute exporter.
6 7 8 |
# File 'lib/drupal/user.rb', line 6 def exporter @exporter end |
Instance Method Details
#save_users_as_json ⇒ Object
12 13 14 15 16 17 |
# File 'lib/drupal/user.rb', line 12 def save_users_as_json exporter.create_directory("#{config.entries_dir}/user") config.db[:users].each do |user_row| extract_data(user_row) end end |