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
:nodoc:.
- #setup ⇒ Object
Constructor Details
#initialize(message_class, rule, type, name, tag, options) ⇒ FieldProxy
Returns a new instance of FieldProxy.
214 215 216 217 |
# File 'lib/protobuf/message/field.rb', line 214 def initialize(, rule, type, name, tag, ) @message_class, @rule, @type, @name, @tag, @options = , rule, type, name, tag, end |
Instance Method Details
#ready? ⇒ Boolean
:nodoc:
219 220 221 |
# File 'lib/protobuf/message/field.rb', line 219 def ready? # :nodoc: false end |
#setup ⇒ Object
223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/protobuf/message/field.rb', line 223 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 |