Class: Resources::Project

Inherits:
Base
  • Object
show all
Defined in:
lib/minglr/resources/project.rb

Class Method Summary collapse

Methods inherited from Base

print_collection, warn

Class Method Details

.configureObject



5
6
7
8
# File 'lib/minglr/resources/project.rb', line 5

def self.configure
  self.prefix = self.prefix.split("/")[0...-1].join("/")
  self.site = self.prefix
end


10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/minglr/resources/project.rb', line 10

def self.print_all(options = [], status_property = nil)
  attributes = [:name, :description]
  projects = find(:all)
  projects.send(:extend, Minglr::Extensions::Array)
  projects = projects.filter(attributes, options)
  
  if projects.any?
    print_collection projects, attributes
  else
    warn "No projects found"
  end
end