Module: LegislationUK::Helper
- Included in:
- Contents, ContentsPart, ContentsPblock
- Defined in:
- lib/legislation_uk.rb
Instance Method Summary collapse
Instance Method Details
#return_values(many) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/legislation_uk.rb', line 26 def return_values many if respond_to?(many) send(many) ? send(many) : [] else one = many.to_s.singularize.to_sym if respond_to?(one) send(one) ? [send(one)] : [] else [] end end end |