Class: Protobuf::Field::FieldProxy
- Inherits:
-
Object
- Object
- Protobuf::Field::FieldProxy
- Defined in:
- lib/protobuf/message/field.rb
Instance Method Summary collapse
-
#initialize(message_class, rule, type, name, tag, options) ⇒ FieldProxy
constructor
A new instance of FieldProxy.
- #ready? ⇒ Boolean
- #setup ⇒ Object
Constructor Details
#initialize(message_class, rule, type, name, tag, options) ⇒ FieldProxy
Returns a new instance of FieldProxy.
238 239 240 241 |
# File 'lib/protobuf/message/field.rb', line 238 def initialize(, rule, type, name, tag, ) @message_class, @rule, @type, @name, @tag, @options = , rule, type, name, tag, end |
Instance Method Details
#ready? ⇒ Boolean
243 244 245 |
# File 'lib/protobuf/message/field.rb', line 243 def ready? false end |
#setup ⇒ Object
247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/protobuf/message/field.rb', line 247 def setup type = typename_to_class(@message_class, @type) field_class = \ if type < Enum EnumField elsif type < Message MessageField else raise TypeError, type.inspect end field_class.new(@message_class, @rule, type, @name, @tag, @options) end |