Class: GoaModelGen::GoStructField
- Inherits:
-
Object
- Object
- GoaModelGen::GoStructField
- Defined in:
- lib/goa_model_gen/go_struct.rb
Instance Attribute Summary collapse
-
#anonymous ⇒ Object
readonly
Returns the value of attribute anonymous.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(d) ⇒ GoStructField
constructor
A new instance of GoStructField.
Constructor Details
#initialize(d) ⇒ GoStructField
Returns a new instance of GoStructField.
25 26 27 28 29 30 |
# File 'lib/goa_model_gen/go_struct.rb', line 25 def initialize(d) @name = d['Name'] @anonymous = d['Anonymous'] @type = GoStructFieldType.new(d['Type']) @tags = d['Tag'] || {} end |
Instance Attribute Details
#anonymous ⇒ Object (readonly)
Returns the value of attribute anonymous.
24 25 26 |
# File 'lib/goa_model_gen/go_struct.rb', line 24 def anonymous @anonymous end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
24 25 26 |
# File 'lib/goa_model_gen/go_struct.rb', line 24 def name @name end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
24 25 26 |
# File 'lib/goa_model_gen/go_struct.rb', line 24 def @tags end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'lib/goa_model_gen/go_struct.rb', line 24 def type @type end |