Module: ProjectHoneypot
- Defined in:
- lib/project_honeypot.rb,
lib/project_honeypot/url.rb,
lib/project_honeypot/base.rb,
lib/project_honeypot/version.rb
Defined Under Namespace
Modules: Rack Classes: Base, Url
Constant Summary collapse
- VERSION =
"0.3.1"
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.last_activity ⇒ Object
Returns the value of attribute last_activity.
-
.offenses ⇒ Object
Returns the value of attribute offenses.
-
.score ⇒ Object
Returns the value of attribute score.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/project_honeypot.rb', line 9 def api_key @api_key end |
.last_activity ⇒ Object
Returns the value of attribute last_activity.
9 10 11 |
# File 'lib/project_honeypot.rb', line 9 def last_activity @last_activity end |
.offenses ⇒ Object
Returns the value of attribute offenses.
9 10 11 |
# File 'lib/project_honeypot.rb', line 9 def offenses @offenses end |
.score ⇒ Object
Returns the value of attribute score.
9 10 11 |
# File 'lib/project_honeypot.rb', line 9 def score @score end |
Class Method Details
.configure(&block) ⇒ Object
16 17 18 |
# File 'lib/project_honeypot.rb', line 16 def configure(&block) class_eval(&block) end |
.lookup(url, api_key = nil) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/project_honeypot.rb', line 21 def self.lookup(url, api_key=nil) api_key ||= ProjectHoneypot.api_key raise ArgumentError, 'Must specify an API key' unless api_key searcher = Base.new(api_key) searcher.lookup(url) end |