Class: Model::StateChange
- Inherits:
-
Object
- Object
- Model::StateChange
- Defined in:
- lib/models/state_change.rb
Instance Attribute Summary collapse
-
#query ⇒ Object
readonly
Returns the value of attribute query.
Instance Method Summary collapse
- #apply ⇒ Object
-
#initialize(node, repository) ⇒ StateChange
constructor
A new instance of StateChange.
Constructor Details
#initialize(node, repository) ⇒ StateChange
Returns a new instance of StateChange.
5 6 7 |
# File 'lib/models/state_change.rb', line 5 def initialize(node, repository) @query = NodeQuery.new(node, repository) end |
Instance Attribute Details
#query ⇒ Object (readonly)
Returns the value of attribute query.
3 4 5 |
# File 'lib/models/state_change.rb', line 3 def query @query end |
Instance Method Details
#apply ⇒ Object
9 10 11 12 13 |
# File 'lib/models/state_change.rb', line 9 def apply new_repo = query.repository.clone new_repo.load_and_process_n3(state_rules) new_repo end |