Class: RubyGitCrypt::Options::Name

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Name

Returns a new instance of Name.



10
11
12
# File 'lib/ruby_git_crypt/options/name.rb', line 10

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

Instance Attribute Details

#nameObject (readonly) Also known as: to_s

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#as_plural_keyObject



20
21
22
# File 'lib/ruby_git_crypt/options/name.rb', line 20

def as_plural_key
  :"#{snake_case}s"
end

#as_singular_keyObject



16
17
18
# File 'lib/ruby_git_crypt/options/name.rb', line 16

def as_singular_key
  snake_case.to_sym
end