Module: Gamefic::Standard::Articles
- Included in:
- Gamefic::Standard
- Defined in:
- lib/gamefic-standard/articles.rb
Overview
Methods for adding definite and indefinite articles to entity names.
Instance Method Summary collapse
-
#a(entity) ⇒ String
(also: #an)
Get a name for the entity with an indefinite article (unless the entity has a proper name).
-
#a_(entity) ⇒ String
(also: #an_, #A, #An)
Get a capitalized name for the entity with an indefinite article (unless the entity has a proper name).
-
#the(entity) ⇒ String
Get a name for the entity with a definite article (unless the entity has a proper name).
-
#the_(entity) ⇒ String
(also: #The)
Get a capitalized name for the entity with a definite article (unless the entity has a proper name).
Instance Method Details
#a(entity) ⇒ String Also known as: an
Get a name for the entity with an indefinite article (unless the entity has a proper name).
13 14 15 |
# File 'lib/gamefic-standard/articles.rb', line 13 def a(entity) entity.indefinitely end |
#a_(entity) ⇒ String Also known as: an_, A, An
Get a capitalized name for the entity with an indefinite article (unless the entity has a proper name).
32 33 34 |
# File 'lib/gamefic-standard/articles.rb', line 32 def a_(entity) entity.indefinitely.cap_first end |
#the(entity) ⇒ String
Get a name for the entity with a definite article (unless the entity has a proper name).
23 24 25 |
# File 'lib/gamefic-standard/articles.rb', line 23 def the(entity) entity.definitely end |
#the_(entity) ⇒ String Also known as: The
Get a capitalized name for the entity with a definite article (unless the entity has a proper name).
44 45 46 |
# File 'lib/gamefic-standard/articles.rb', line 44 def the_(entity) entity.definitely.cap_first end |