Class: ActiveTriples::ExtensionStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/active_triples/extension_strategy.rb

Overview

Default property applying strategy which just copies all configured properties from a data property to a new resource, assuming it supports the #property interface.

Class Method Summary collapse

Class Method Details

.apply(resource, property) ⇒ Object

Parameters:



12
13
14
# File 'lib/active_triples/extension_strategy.rb', line 12

def apply(resource, property)
  resource.property(property.name, property.to_h, &property.config)
end