Class: RubyTerraform::Options::Definition
- Inherits:
-
Object
- Object
- RubyTerraform::Options::Definition
- Defined in:
- lib/ruby_terraform/options/definition.rb
Overview
rubocop:disable Metrics/ClassLength
Instance Method Summary collapse
- #build(parameters) ⇒ Object
-
#initialize(opts) ⇒ Definition
constructor
rubocop:disable Metrics/MethodLength.
-
#matches?(name) ⇒ Boolean
rubocop:enable Metrics/MethodLength.
Constructor Details
#initialize(opts) ⇒ Definition
rubocop:disable Metrics/MethodLength
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ruby_terraform/options/definition.rb', line 23 def initialize(opts) raise 'Missing name.' unless opts[:name] super( name: Name.new(opts[:name]), option_type: Types.resolve(opts[:option_type]) || Types::Standard, value_type: Values.resolve(opts[:value_type]) || Values::String, repeatable: opts[:repeatable] || false, separator: opts[:separator], placement: opts[:placement], extra_keys: { singular: [], plural: [] } .merge(opts[:extra_keys] || {}), override_keys: { singular: nil, plural: nil } .merge(opts[:override_keys] || {}) ) end |
Instance Method Details
#build(parameters) ⇒ Object
47 48 49 |
# File 'lib/ruby_terraform/options/definition.rb', line 47 def build(parameters) (parameters) + (parameters) end |