Module: Sandals
- Defined in:
- lib/sandals.rb,
lib/sandals/cli.rb,
lib/sandals/view.rb,
lib/sandals/server.rb,
lib/sandals/version.rb,
lib/sandals/application.rb,
lib/sandals/action_error.rb,
lib/sandals/test_session.rb,
lib/sandals/code_reloader.rb,
lib/sandals/error_details.rb,
lib/sandals/html_renderer.rb,
lib/sandals/uploaded_file.rb,
lib/sandals/binding_resolver.rb,
lib/sandals/event_dispatcher.rb,
lib/sandals/snapshot_history.rb
Defined Under Namespace
Modules: Actionable, FieldValidation
Classes: ActionError, Application, BindingResolver, Button, CLI, Checkbox, CodeReloader, Container, Emphasis, Error, ErrorDetails, EventDispatcher, FileField, Flow, Form, HTMLRenderer, Image, Link, Notice, NumberField, Para, Radio, Select, Server, SnapshotHistory, Stack, Strong, Submit, Subtitle, Table, TestSession, TextArea, TextField, Title, UploadedFile, View
Constant Summary
collapse
- VERSION =
"0.1.2"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.application ⇒ Object
Returns the value of attribute application.
19
20
21
|
# File 'lib/sandals.rb', line 19
def application
@application
end
|
Class Method Details
.app(title: "Sandals", &block) ⇒ Object
21
22
23
|
# File 'lib/sandals.rb', line 21
def app(title: "Sandals", &block)
@application = Application.new(title:, &block)
end
|
.load(path) ⇒ Object
25
26
27
28
29
|
# File 'lib/sandals.rb', line 25
def load(path)
@application = nil
Kernel.load(File.expand_path(path))
application || raise(ArgumentError, "#{path} does not define Sandals.app")
end
|
.test(application) ⇒ Object
31
32
33
|
# File 'lib/sandals.rb', line 31
def test(application)
TestSession.new(application)
end
|