Class: Hancock::Consumer
- Inherits:
-
Object
- Object
- Hancock::Consumer
- Includes:
- DataMapper::Resource
- Defined in:
- lib/models/consumer.rb
Class Method Summary collapse
Class Method Details
.allowed?(host) ⇒ Boolean
9 10 11 |
# File 'lib/models/consumer.rb', line 9 def self.allowed?(host) !first(:url => host).nil? end |
.internal ⇒ Object
19 20 21 22 23 |
# File 'lib/models/consumer.rb', line 19 def self.internal all(:internal => true).select do |c| c.label end end |
.visible ⇒ Object
13 14 15 16 17 |
# File 'lib/models/consumer.rb', line 13 def self.visible all(:internal => false).select do |c| c.label end end |