Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Sep 20, 2024
1 parent 442f34f commit 09a3374
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: read

jobs:
test:
rubocop:
name: RuboCop
runs-on: ubuntu-latest

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/yard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: YARD

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
yard:
name: YARD
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6.10'
bundler-cache: false
rubygems: latest
- name: Lint YARD documentation
run: |
gem install yard
yard doc --fail-on-warning --no-output --no-progress
2 changes: 1 addition & 1 deletion lib/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def self.symbolize_keys(obj)
# Converts a language code to its corresponding ISO 639-2 (alpha-3) code.
#
# @param [String] language The ISO 639-1 (alpha-2) or ISO 639-2 (alpha-3) language code.
# @return [String] The ISO 639-2 (alpha-3) language code, or `nil` if the code is not found.
# @return [String, nil] The ISO 639-2 (alpha-3) language code, or `nil` if the language is not found.
def self.language_alpha3(language)
ISO_639.find(language)&.alpha3
end
Expand Down

0 comments on commit 09a3374

Please sign in to comment.