lib/lucid_edge/mixin.rb in isomorfeus-data-1.0.0.zeta2 vs lib/lucid_edge/mixin.rb in isomorfeus-data-1.0.0.zeta3
- old
+ new
@@ -101,11 +101,10 @@
cid = from_as_cid
cid ? LucidNode::Base.node_from_cid(cid) : nil
end
def from_as_cid
- Redux.register_used_store_path(:data_state, :edges, @class_name, @id, :from)
return @changed_from_cid if @changed_from_cid
cid = Redux.fetch_by_path(:data_state, :edges, @class_name, @id, :from)
cid ? cid : nil
end
@@ -118,18 +117,16 @@
cid = to_as_cid
cid ? LucidNode::Base.node_from_cid(cid) : nil
end
def to_as_cid
- Redux.register_used_store_path(:data_state, :edges, @class_name, @id, :to)
return @changed_to_cid if @changed_to_cid
cid = Redux.fetch_by_path(:data_state, :edges, @class_name, @id, :to)
cid ? cid : nil
end
def to_transport(*args)
- Redux.register_used_store_path(:data_state, :edges, @class_name, @id)
final_attributes = {}
self.class.attributes.each do |attr|
next if attr == :id
final_attributes[attr] = send(attr)
end
@@ -139,20 +136,18 @@
base.instance_exec do
def attribute(name, options = {})
attribute_options[name] = options
define_method(name) do
- Redux.register_used_store_path(:data_state, :edges, @class_name, @id, :attributes, name)
if changed_attributes.key?(name)
changed_attributes[name]
else
Redux.fetch_by_path(:data_state, :edges, @class_name, @id, :attributes, name)
end
end
define_method("#{name}=") do |arg|
validate_attribute!(name, arg)
- Redux.register_used_store_path(:data_state, :edges, @class_name, @id, :attributes, name)
changed_attributes.set(name, arg)
end
end
end
else # RUBY_ENGINE