Class: Noah::Hosts
- Inherits:
-
Object
- Object
- Noah::Hosts
- Defined in:
- lib/noah/models/hosts.rb
Class Method Summary collapse
-
.all(options = {}) ⇒ Array
Array of Host objects.
Class Method Details
.all(options = {}) ⇒ Array
Returns Array of Noah::Host objects.
56 57 58 59 60 61 |
# File 'lib/noah/models/hosts.rb', line 56 def self.all( = {}) host_hash = Hash.new .empty? ? hosts=Noah::Host.all.sort : hosts=Noah::Host.find().sort hosts.each {|x| host_hash["#{x.name}"] = x.to_hash.reject {|k,v| k == :name } } host_hash end |