Class: Sublayer::Components::OutputAdapters::ListOfStrings
- Inherits:
-
Object
- Object
- Sublayer::Components::OutputAdapters::ListOfStrings
- Defined in:
- lib/sublayer/components/output_adapters/list_of_strings.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options) ⇒ ListOfStrings
constructor
A new instance of ListOfStrings.
- #properties ⇒ Object
Constructor Details
#initialize(options) ⇒ ListOfStrings
Returns a new instance of ListOfStrings.
7 8 9 10 |
# File 'lib/sublayer/components/output_adapters/list_of_strings.rb', line 7 def initialize() @name = [:name] @description = [:description] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
5 6 7 |
# File 'lib/sublayer/components/output_adapters/list_of_strings.rb', line 5 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/sublayer/components/output_adapters/list_of_strings.rb', line 5 def name @name end |
Instance Method Details
#properties ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sublayer/components/output_adapters/list_of_strings.rb', line 12 def properties [ OpenStruct.new( name: @name, type: 'array', description: @description, required: true, items: { type: 'string' } ) ] end |