Method: Roby::StateModel#resolve_data_sources

Defined in:
lib/roby/state/state_model.rb

#resolve_data_sources(object, state) ⇒ Object

This methods iterates over the state model, and for each state variable for which a data source model is provided, create the corresponding data source by calling #resolve



65
66
67
68
69
70
71
72
73
# File 'lib/roby/state/state_model.rb', line 65

def resolve_data_sources(object, state)
    each_member do |name, field|
        if field.respond_to?(:data_source)
            state.data_sources.set(name, field.data_source.resolve(object))
        else
            field.resolve_data_sources(object, state.__get(name, true))
        end
    end
end