Module: Articles

Included in:
Gamefic::Plot, Gamefic::Subplot
Defined in:
lib/gamefic-standard/articles.rb

Instance Method Summary collapse

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).

Parameters:

Returns:

  • (String)


7
8
9
# File 'lib/gamefic-standard/articles.rb', line 7

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).

Parameters:

Returns:

  • (String)


26
27
28
# File 'lib/gamefic-standard/articles.rb', line 26

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).

Parameters:

Returns:

  • (String)


17
18
19
# File 'lib/gamefic-standard/articles.rb', line 17

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).

Parameters:

Returns:

  • (String)


38
39
40
# File 'lib/gamefic-standard/articles.rb', line 38

def the_(entity)
  entity.definitely.cap_first
end