Class: RubyGitCrypt::Options::Name
- Inherits:
-
Object
- Object
- RubyGitCrypt::Options::Name
- Defined in:
- lib/ruby_git_crypt/options/name.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #as_plural_key ⇒ Object
- #as_singular_key ⇒ Object
-
#initialize(name) ⇒ Name
constructor
A new instance of Name.
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
#name ⇒ Object (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_key ⇒ Object
20 21 22 |
# File 'lib/ruby_git_crypt/options/name.rb', line 20 def as_plural_key :"#{snake_case}s" end |
#as_singular_key ⇒ Object
16 17 18 |
# File 'lib/ruby_git_crypt/options/name.rb', line 16 def as_singular_key snake_case.to_sym end |