Class: GoaModelGen::GoStructField

Inherits:
Object
  • Object
show all
Defined in:
lib/goa_model_gen/go_struct.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#anonymousObject (readonly)

Returns the value of attribute anonymous.



24
25
26
# File 'lib/goa_model_gen/go_struct.rb', line 24

def anonymous
  @anonymous
end

#nameObject (readonly)

Returns the value of attribute name.



24
25
26
# File 'lib/goa_model_gen/go_struct.rb', line 24

def name
  @name
end

#tagsObject (readonly)

Returns the value of attribute tags.



24
25
26
# File 'lib/goa_model_gen/go_struct.rb', line 24

def tags
  @tags
end

#typeObject (readonly)

Returns the value of attribute type.



24
25
26
# File 'lib/goa_model_gen/go_struct.rb', line 24

def type
  @type
end