forked from faker-ruby/faker
/
bird.rb
169 lines (156 loc) · 4.14 KB
/
bird.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# frozen_string_literal: true
module Faker
class Creature
class Bird < Base
flexible :bird
class << self
##
# Produces a random common family name of a bird
#
# @return [String]
#
# @example
# Faker::Creature::Bird.common_family_name #=> "Owls"
#
# @faker.version 2.16.0
def common_family_name
fetch('creature.bird.common_family_name')
end
##
# Produces a random common taxonomic order from the class Aves
#
# @return [String]
#
# @example
# Faker::Creature::Bird.order #=> "Passeriformes"
#
# @faker.version 2.16.0
def order
fetch('creature.bird.order')
end
##
# Produces a random bird anatomy word
#
# @return [String]
#
# @example
# Faker::Creature::Bird.anatomy #=> "rump"
#
# @faker.version 2.16.0
def anatomy
fetch('creature.bird.anatomy')
end
##
# Produces a random, past tensed bird anatomy word
#
# @return [String]
#
# @example
# Faker::Creature::Bird.anatomy #=> "breasted"
#
# @faker.version 2.16.0
def anatomy_past_tense
fetch('creature.bird.anatomy_past_tense')
end
##
# Produces a random geographical word used in describing birds
#
# @return [String]
#
# @example
# Faker::Creature::Bird.geo #=> "Eurasian"
#
# @faker.version 2.16.0
def geo
fetch('creature.bird.geo')
end
##
# Produces a random color word used in describing birds
#
# @return [String]
#
# @example
# Faker::Creature::Bird.color #=> "ferruginous"
#
# @faker.version 2.16.0
def color
fetch('creature.bird.colors')
end
##
# Produces a random adjective used to described birds
#
# @return [String]
#
# @example
# Faker::Creature::Bird.adjective #=> 'common'
#
# @faker.version 2.16.0
def adjective
fetch('creature.bird.adjectives')
end
##
# Produces a random emotional adjective NOT used to described birds
# ...but could be
#
# @return [String]
#
# @example
# Faker::Creature::Bird.emotional_adjective #=> 'cantankerous'
#
# @faker.version 2.16.0
def emotional_adjective
fetch('creature.bird.emotional_adjectives')
end
##
# Produces a random adjective NOT used to described birds
# ...but probably shouldn't
#
# @return [String]
#
# @example
# Faker::Creature::Bird.silly_adjective #=> 'drunk'
#
# @faker.version 2.16.0
def silly_adjective
fetch('creature.bird.silly_adjectives')
end
##
# Produces a random common name for a bird
#
# @return [String]
#
# @example
# Faker::Creature::Bird.common_name #=> 'wren'
#
# @faker.version 2.16.0
def common_name
fetch('creature.bird.common_names').downcase
end
##
# Produces a random and plausible common name for a bird
#
# @return [String]
#
# @example
# Faker::Creature::Bird.plausible_common_name #=> 'Hellinger's Wren'
#
# @faker.version 2.16.0
def plausible_common_name
parse('creature.bird.plausible_common_names').capitalize
end
##
# Produces a random and IMplausible common name for a bird
#
# @return [String]
#
# @example
# Faker::Creature::Bird.implausible_common_name #=> 'Hellinger's Cantankerous Chickadee'
#
# @faker.version 2.16.0
def implausible_common_name
parse('creature.bird.implausible_common_names').capitalize
end
end
end
end
end