Class: Calatrava::Shell

Inherits:
Object
  • Object
show all
Defined in:
lib/calatrava/shell.rb

Instance Method Summary collapse

Constructor Details

#initialize(proj_path) ⇒ Shell

Returns a new instance of Shell.



4
5
6
# File 'lib/calatrava/shell.rb', line 4

def initialize(proj_path)
  @path = proj_path
end

Instance Method Details

#coffee_filesObject



8
9
10
11
12
# File 'lib/calatrava/shell.rb', line 8

def coffee_files
  Dir.chdir @path do
    Dir["shell/support/*.coffee"] + Dir["shell/support/*.coffee"]
  end
end

#css_filesObject



20
21
22
23
24
# File 'lib/calatrava/shell.rb', line 20

def css_files
  Dir.chdir @path do
    Dir["shell/stylesheets/*.sass"] + Dir["shell/stylesheets/*.css"]
  end
end

#featuresObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/calatrava/shell.rb', line 26

def features
  Dir.chdir @path do
    Dir["shell/pages/*"].collect do |f|
      if File.directory?(f)
        {
          :name => File.basename(f),
          :coffee => Dir["#{f}/*.coffee"],
          :haml => Dir["#{f}/*.haml"]
        }
      else
        nil
      end
    end.compact
  end
end

#haml_filesObject



14
15
16
17
18
# File 'lib/calatrava/shell.rb', line 14

def haml_files
  Dir.chdir @path do
    Dir["shell/support/*.haml"]
  end
end