class ButterCMS::Parsers::Categories

Attributes

response[R]

Public Class Methods

new(response) click to toggle source
# File lib/butter_cms/parsers/categories.rb, line 7
def initialize(response)
  @response = response
end

Public Instance Methods

categories() click to toggle source

Returns array of category attributes available in the response

@return [Array]

# File lib/butter_cms/parsers/categories.rb, line 14
def categories
  parsed_json['data']
end

Private Instance Methods

parsed_json() click to toggle source
# File lib/butter_cms/parsers/categories.rb, line 22
def parsed_json
  @parsed_json ||= ::JSON.parse(response.body)
end