Sha256: dec122aecc974087a7a832b44dbff2315fe244a5f3afb5cd4d2b527b8ef012b3

Contents?: true

Size: 342 Bytes

Versions: 11

Compression:

Stored size: 342 Bytes

Contents

module Siteleaf
  class Post < Page

    attr_accessor :taxonomy
    
    def create_endpoint
      "pages/#{self.parent_id}/posts"
    end
    
    def parent
      Page.find(self.parent_id)
    end
    
    def assets
      result = Client.get "posts/#{self.id}/assets"
      result.map { |r| Asset.new(r) } if result
    end
    
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
siteleaf-0.9.23 lib/siteleaf/post.rb
siteleaf-0.9.22 lib/siteleaf/post.rb
siteleaf-0.9.21 lib/siteleaf/post.rb
siteleaf-0.9.20 lib/siteleaf/post.rb
siteleaf-0.9.19 lib/siteleaf/post.rb
siteleaf-0.9.18 lib/siteleaf/post.rb
siteleaf-0.9.17 lib/siteleaf/post.rb
siteleaf-0.9.16 lib/siteleaf/post.rb
siteleaf-0.9.15 lib/siteleaf/post.rb
siteleaf-0.9.14 lib/siteleaf/post.rb
siteleaf-0.9.13 lib/siteleaf/post.rb