vendor/gen-rb/scribe.rb in scribe-0.2.2 vs vendor/gen-rb/scribe.rb in scribe-0.2.3

- old
+ new

@@ -42,30 +42,29 @@ end # HELPER FUNCTIONS AND STRUCTURES class Log_args - include ::Thrift::Struct + include ::Thrift::Struct, ::Thrift::Struct_Union MESSAGES = 1 - ::Thrift::Struct.field_accessor self, :messages FIELDS = { MESSAGES => {:type => ::Thrift::Types::LIST, :name => 'messages', :element => {:type => ::Thrift::Types::STRUCT, :class => ScribeThrift::LogEntry}} } def struct_fields; FIELDS; end def validate end + ::Thrift::Struct.generate_accessors self end class Log_result - include ::Thrift::Struct + include ::Thrift::Struct, ::Thrift::Struct_Union SUCCESS = 0 - ::Thrift::Struct.field_accessor self, :success FIELDS = { SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ScribeThrift::ResultCode} } def struct_fields; FIELDS; end @@ -74,9 +73,10 @@ unless @success.nil? || ScribeThrift::ResultCode::VALID_VALUES.include?(@success) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!') end end + ::Thrift::Struct.generate_accessors self end end