Class: RubyTerraform::Options::Name

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_terraform/options/name.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Name

Returns a new instance of Name.



8
9
10
# File 'lib/ruby_terraform/options/name.rb', line 8

def initialize(name)
  super(name: name.to_s)
end

Instance Method Details

#as_plural_keyObject



22
23
24
# File 'lib/ruby_terraform/options/name.rb', line 22

def as_plural_key
  "#{snake_case}s".to_sym
end

#as_singular_keyObject



18
19
20
# File 'lib/ruby_terraform/options/name.rb', line 18

def as_singular_key
  snake_case.to_sym
end

#nameObject Also known as: to_s



12
13
14
# File 'lib/ruby_terraform/options/name.rb', line 12

def name
  "-#{without_prefix}"
end