Class: GhostRb::Controllers::PostsController
Overview
Instance Attribute Summary collapse
#client, #params
Instance Method Summary
collapse
#all, #fields, #filter, #find_by, #include, #limit, #order, #page, #where
Constructor Details
#initialize(client, params = nil) ⇒ PostsController
Returns a new instance of PostsController.
10
11
12
13
14
|
# File 'lib/ghost_rb/controllers/posts_controller.rb', line 10
def initialize(client, params = nil)
super
@endpoint = 'posts'
@resource_klass = Resources::Post
end
|
Instance Attribute Details
#endpoint ⇒ Object
8
9
10
|
# File 'lib/ghost_rb/controllers/posts_controller.rb', line 8
def endpoint
@endpoint
end
|
#resource_klass ⇒ Object
8
9
10
|
# File 'lib/ghost_rb/controllers/posts_controller.rb', line 8
def resource_klass
@resource_klass
end
|
Instance Method Details
16
17
18
|
# File 'lib/ghost_rb/controllers/posts_controller.rb', line 16
def formats(formats)
where(formats: formats)
end
|