Sha256: e7e156bd21208efa8f5bff77e4a10c1c9cccc08507422178273a49b971f7b973
Contents?: true
Size: 455 Bytes
Versions: 11
Compression:
Stored size: 455 Bytes
Contents
module Siteleaf class Post < Page attr_accessor :taxonomy def self.all result = Client.get "#{self.endpoint}" result.map { |r| self.new(r) } if result end def self.find(id) result = Client.get "#{self.endpoint}/#{id}" self.new(result) if result end def create_endpoint "pages/#{self.parent_id}/posts" end def parent Page.find(self.parent_id) end end end
Version data entries
11 entries across 11 versions & 1 rubygems