Method: BlackStack::Workmesh::Protocol#initialize
- Defined in:
- lib/workmesh.rb
#initialize(h) ⇒ Protocol
Returns a new instance of Protocol.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/workmesh.rb', line 105 def initialize(h) errors = BlackStack::Workmesh::Protocol.descriptor_errors(h) raise "The protocol descriptor is not valid: #{errors.uniq.join(".\n")}" if errors.length > 0 self.name = h[:name] self.entity_table = h[:entity_table] self.entity_field_id = h[:entity_field_id] self.entity_field_sort = h[:entity_field_sort] self.push_function = h[:push_function] self.entity_field_push_time = h[:entity_field_push_time] self.entity_field_push_success = h[:entity_field_push_success] self.entity_field_push_error_description = h[:entity_field_push_error_description] self.pull_function = h[:pull_function] #self.enttity_field_pull_time = h[:entity_field_pull_time] #self.entity_field_pull_success = h[:entity_field_pull_success] #self.entity_field_pull_error_description = h[:entity_field_pull_error_description] end |