Sha256: e2f1333807516b56594ce3753b4d79cd3ed59d9cbf90f7c0b75b0774e63277de
Contents?: true
Size: 550 Bytes
Versions: 21
Compression:
Stored size: 550 Bytes
Contents
module Sentimeta class Model def initialize params = {} (params || {}).each do |key, value| method = "#{key}=" public_send(method, value) if respond_to?(method) end end def self.endpoint endpoint @endpoint = endpoint end protected def self.fetch options={} response = Sentimeta::Client.public_send @endpoint, options if response.kind_of? Array response.map { |entry| new entry } elsif response.kind_of? Hash new response end end end end
Version data entries
21 entries across 21 versions & 1 rubygems