Module: Sensor

Defined in:
lib/sensor.rb,
lib/sensor/payload.rb,
lib/sensor/version.rb,
lib/sensor/rake_task.rb,
lib/sensor/time_range.rb,
lib/sensor/configuration.rb,
lib/sensor/output_distribution/slack.rb,
lib/sensor/actuator/twitter_retrieval.rb,
lib/sensor/actuator/facebook_retrieval.rb,
lib/sensor/actuator/analytics_retrieval.rb,
lib/sensor/output_distribution/flow_dock.rb

Defined Under Namespace

Modules: Actuator, OutputDistribution Classes: Configuration, Payload, RakeTask, TimeRange

Constant Summary collapse

VERSION =
"0.0.8"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



5
6
7
# File 'lib/sensor.rb', line 5

def configuration
  @configuration
end

Class Method Details

.configure(&block) ⇒ Object



7
8
9
# File 'lib/sensor.rb', line 7

def configure(&block)
  @configuration = Sensor::Configuration.new(&block)
end

.require(path) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/sensor.rb', line 15

def require(path)
  begin
    super("sensor/actuator/#{path}")
  rescue LoadError => e
    if e.message =~ /#{Regexp.escape(path)}/
      super("sensor/output_distribution/#{path}")
    else
      raise e
    end
  end
end