lib/remnant/configuration.rb in remnant-0.2.2 vs lib/remnant/configuration.rb in remnant-0.2.3
- old
+ new
@@ -10,12 +10,16 @@
attr_reader :port_number
# api key to use with payloads
attr_reader :tag
+ # how often to use results
attr_reader :sample_rate
+ # allow applications to run custom code with stats
+ attr_reader :custom_hook
+
def host(value)
@hostname = value
end
def port(value)
@@ -30,9 +34,13 @@
@env = value
end
def sample(value)
@sample_rate = value
+ end
+
+ def hook(&block)
+ @custom_hook = block
end
def defaults!
# configure some defaults