lib/moo_ebooks/model.rb
def consume!(content)
      unless content.key?(:statuses) || content.key?(:mentions)
        raise ArgumentError, 'Malformed hash object. At least :statuses and/or'\
                             ' :mentions must be present as a key'
      end
      consume_statuses(content[:statuses]) unless content[:statuses].nil?
      consume_mentions(content[:mentions]) unless content[:mentions].nil?
      nil
    end
# Consume a corpus into this model
# @param content [Hash]
Consume a corpus into this model
Consume a corpus into this model
def consume!(content)
      unless content.key?(:statuses) || content.key?(:mentions)
        raise ArgumentError, 'Malformed hash object. At least :statuses and/or'\
                             ' :mentions must be present as a key'
      end
      consume_statuses(content[:statuses]) unless content[:statuses].nil?
      consume_mentions(content[:mentions]) unless content[:mentions].nil?
      nil
    end
def consume! ( content ) unless content . key? ( :statuses ) || content . key? ( :mentions ) raise ArgumentError , 'Malformed hash object. At least :statuses and/or' ' :mentions must be present as a key' end consume_statuses ( content [ :statuses ] ) unless content [ :statuses ] . nil? consume_mentions ( content [ :mentions ] ) unless content [ :mentions ] . nil? nil end
Consume a corpus into this model
Consume a corpus into this model
content
None