Sha256: 18ceadd2fe0cd1b5a61dd7317a4279de9fa76331bb1177ee0c6adec72f977dac
Contents?: true
Size: 1.65 KB
Versions: 13
Compression:
Stored size: 1.65 KB
Contents
module Ecoportal module API class V2 class Page class Force class Binding < Common::Content::DoubleModel class << self def new_doc { "id" => new_uuid } end end COMPONENT_TYPE = "membrane_binding" SECTION_TYPE = "flow_node_binding" passkey :id passforced :patch_ver, default: 1 passthrough :name, :reference_id, :type def ooze self._parent.ooze end # @return [Boolean] whether or not this the binding refers to a Component def component? type == COMPONENT_TYPE end # @return [Boolean] whether or not this the binding refers to a Section def section? type == SECTION_TYPE end # @return [Ecoportal::API::V2::Page::Component] field referenced by this binding. def component raise "This is not a component binding, but a section binding" unless component? ooze.components.get_by_id(reference_id) end # @return [Ecoportal::API::V2::Page::Section] section referenced by this binding. def section raise "This is not a section binding, but a component binding" unless section? ooze.sections.get_by_id(reference_id) end end end end end end end require 'ecoportal/api/v2/page/force/binding' require 'ecoportal/api/v2/page/force/bindings'
Version data entries
13 entries across 13 versions & 1 rubygems