module Stackreduce
Constants
- VERSION
Public Class Methods
configure() { |self| ... }
click to toggle source
User from rails initializer
Examples¶ ↑
Stackreduce.configure
do |config|
config.token = "my_very_big_token" config.app_id = "my_applications_id"
end
# File lib/stackreduce.rb, line 21 def self.configure yield self end
exception(e)
click to toggle source
# File lib/stackreduce/exceptions.rb, line 6 def self.exception e raise StackreduceException.new e end
parse(data)
click to toggle source
Parses the given array to json
Arguments¶ ↑
-
data
- Array
Examples¶ ↑
Stackreduce.parse
Client.includes(:address).limit(10) Stackreduce.parse
User.all
# File lib/stackreduce.rb, line 39 def self.parse(data) Stackreduce::Stack.parse(data) end
push(data=nil, options = {})
click to toggle source
Main api call method
Arguments¶ ↑
-
data
- Array
Examples¶ ↑
Stackreduce.push
Client.includes(:address).limit(10) Stackreduce.push
User.all Stackreduce.push
User.all, :stack => “My awesome stack”
# File lib/stackreduce.rb, line 50 def self.push(data=nil, options = {}) Stackreduce::Stack.push(data, options) end
seed(options = {})
click to toggle source
Seeding demo stacks
Arguments¶ ↑
-
:users
- String -
:products
- String
Examples¶ ↑
Stackreduce.seed
Stackreduce.seed
:users => “My Users Stack” Stackreduce.seed
:products => “My Products Stack”
# File lib/stackreduce.rb, line 63 def self.seed(options = {}) Stackreduce::Seed.seed(options) end