【文件属性】:
文件名称:opal-praha:考虑到约定优于配置的蛋白石-维也纳重写
文件大小:61KB
文件格式:ZIP
更新时间:2021-05-03 05:56:11
Ruby
Praha:Opal的客户端MVC框架
下一步:发布The 实现。
安装
通过引用Github源将opal-praha添加到您的Gemfile 。
gem 'opal-praha'
如果要在静态应用程序中编译蛋白石,请确保首先需要捆绑器。
require 'bundler'
Bundler . require
模型
客户端模型。
class Book < Praha :: Model
attributes :title , :author
end
book = Book . new ( title : 'My awesome book' , author : 'Bob' )
book . title = 'Bob: A story of awesome'
属性
可以使用attributes在子类上定义attributes 。 这只是使用attr_accessor定义了一个g
【文件预览】:
opal-praha-master
----.gitignore(29B)
----config.ru(146B)
----.travis.yml(88B)
----LICENSE(1KB)
----opal-praha.gemspec(934B)
----spec()
--------model()
--------output_buffer_spec.rb(933B)
--------route_spec.rb(3KB)
--------history_router_spec.rb(1KB)
--------template_view_spec.rb(1KB)
--------observable_spec.rb(3KB)
--------vendor()
--------spec_helper.rb(1KB)
--------router_spec.rb(2KB)
--------record_array_spec.rb(1KB)
--------model_spec.rb(2KB)
--------eventable_spec.rb(2KB)
--------observable_array_spec.rb(3KB)
--------view_spec.rb(2KB)
----README.md(5KB)
----opal()
--------praha()
--------praha.rb(92B)
----lib()
--------opal-praha.rb(21B)
--------opal()
----Gemfile(209B)
----Rakefile(164B)