Class: Bike::Set::Static
- Includes:
- Bike::Set
- Defined in:
- lib/_widget/action_update.rb,
lib/set/static.rb
Overview
- Author
-
Akira FUNAI
- Copyright
-
Copyright © 2009-2010 Akira FUNAI
Direct Known Subclasses
Defined Under Namespace
Classes: Folder
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
- #commit(type = :temp) ⇒ Object
-
#initialize(meta = {}) ⇒ Static
constructor
A new instance of Static.
- #meta_href ⇒ Object
Methods included from Bike::Set
#collect, #each, #errors, #inspect_items, #item, #meta_base_path, #meta_dir, #meta_path, #pending?, #val
Methods inherited from Field
#[], #[]=, #create, #default_action, #delete, #empty?, #errors, #find_ancestor, #get, h, #inspect, instance, #item, #load, #load_default, #meta_admins, #meta_client, #meta_folder, #meta_full_name, #meta_group, #meta_name, #meta_owner, #meta_owners, #meta_roles, #meta_sd, #meta_short_name, #pending?, #permit?, #post, #update, #val, #valid?, #workflow
Methods included from I18n
_, bindtextdomain, domain, domain=, find_msg, lang, lang=, merge_msg!, msg, n_, parse_msg, po_dir, po_dir=
Constructor Details
#initialize(meta = {}) ⇒ Static
Returns a new instance of Static.
12 13 14 15 16 17 |
# File 'lib/set/static.rb', line 12 def initialize( = {}) @meta = @meta.merge!(Bike::Parser.parse_html([:html])) if [:html] @meta[:item] ||= {} @item_object = {} end |
Instance Method Details
#commit(type = :temp) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/set/static.rb', line 23 def commit(type = :temp) items = pending_items items.each {|id, item| item.commit type } if valid? @result = (@action == :update) ? items : @action @action = nil if type == :persistent self end end |