Sha256: 5fc2525fe09e410302606f60282795f27412200dce526a734d72350eb4da1805
Contents?: true
Size: 640 Bytes
Versions: 2
Compression:
Stored size: 640 Bytes
Contents
class Iknow::Sentence < Iknow::Base ATTRIBUTES = [:sound, :image, :text] WRITABLE_ATTRIBUTES = [:sound, :image] attr_accessor *WRITABLE_ATTRIBUTES attr_reader *(ATTRIBUTES - WRITABLE_ATTRIBUTES) def self.recent(params = {}) response = Iknow::RestClient::Sentence.recent(params) self.deserialize(response) || [] end def self.matching(keyword, params = {}) params[:keyword] = keyword response = Iknow::RestClient::Sentence.matching(params) self.deserialize(response) || [] end def initialize(params = {}) @sound = params['sound'] @image = params['image'] @text = params['text'] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nov-iknow-0.0.2 | lib/iknow/model/sentence.rb |
nov-iknow-0.0.3 | lib/iknow/model/sentence.rb |