class TheGrid::Config

Attributes

commands_lookup_scopes[RW]
default_max_per_page[RW]
prettify_json[RW]

Public Class Methods

new() click to toggle source
# File lib/the_grid/config.rb, line 5
def initialize
  self.commands_lookup_scopes = []
  self.prettify_json  = false
end

Public Instance Methods

apply() click to toggle source
# File lib/the_grid/config.rb, line 10
def apply
  self.commands_lookup_scopes.flatten.each{ |s| Api::Command.register_lookup_scope(s) }
  Api::Command.find(:paginate).default_per_page = self.default_max_per_page
  Builder::Json.prettify_json = self.prettify_json
end