Class: Sharpie::Builder

Inherits:
Object
  • Object
show all
Includes:
Rack::Test::Methods
Defined in:
lib/sharpie.rb

Constant Summary collapse

@@file_extensions =
%w(css js xml json html csv)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sinatra_application) ⇒ Builder

Returns a new instance of Builder.



24
25
26
# File 'lib/sharpie.rb', line 24

def initialize(sinatra_application)
  @app = sinatra_application
end

Instance Attribute Details

#appObject

Returns the value of attribute app.



19
20
21
# File 'lib/sharpie.rb', line 19

def app
  @app
end

Instance Method Details

#build!(dir) ⇒ Object



28
29
30
31
32
# File 'lib/sharpie.rb', line 28

def build!(dir)
  handle_error_no_each_route! unless @app.respond_to?(:each_route)
  #handle_error_dir_not_found!(dir) unless dir_exists?(dir)
  build_routes(dir)
end