Ramaze upload file




















Could not load tags. This branch is up to date with master. Latest commit. Git stats 3, commits. Failed to load latest commit information.

View code. Ramaze Ramaze is a very simple and straight-forward web-framework. About Ramaze is a simple, light and modular open-source web application framework written in Ruby. Releases 11 tags. Packages 0 No packages published. You signed in with another tab or window. Reload to refresh your session.

First you must include the module and then call options. Inside the block passed to options. This method has the following syntax:. Say we want to define a option that allows the user to change a username, this can be done as following:. Once an option is set it can be retrieved by calling options on the class regardless of whether or not the call was made inside an instance :.

Dumping the entire options object to the command line using puts or something similar will also show the description of each option, the default value, etc:. While Ramaze is a very flexible framework it requires some basic information about the location of your views, layouts and so on. Ramaze does not automatically try to locate these but instead uses a set of defined locations to look for. These paths are set using Ramaze::Optioned and can be found in the following options:. Helpers aren't defined in these paths as they're considered a separate part of Ramaze.

Instead of using Ramaze. Note that Ramaze. Let's say you want to have an extra view directory called "templates", this directory can be added as following:. If the "templates" directory is located a level above the application root you'd do the following instead:. Another one of the goals during development of Ramaze was to make every part as modular and therefore reusable as possible, not only to provide a basic understanding after the first glance, but also to make it as simple as possible to reuse parts of the code.

The original purpose of Ramaze was to act as a kind of framework to build web-frameworks, this was made obsolete by the introduction of Rack, which provides this feature at a better level without trying to enforce any structural layout of the resulting framework. Today Ramaze serves as a framework for those who want to develop their projects in their own way rather than being forced to work in a way that the framework and its creators define.

It tries not to make any assumptions and more importantly: it puts you back in control of your code. An example of this is the default file structure of new Ramaze projects.

Out of the box a new project uses the MVC pattern. The cool thing about Ramaze however is that you're not forced to use this pattern.



0コメント

  • 1000 / 1000