Skip to content

Commit

Permalink
Fix rubocop error for the constant by converting to uppercase - new (#…
Browse files Browse the repository at this point in the history
…1562)

* Add contributors
  • Loading branch information
egemen-dev authored Aug 20, 2023
1 parent 4d26aaf commit f369455
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions exercises/concept/port-palermo/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ The system has to handle identifiers for ships, but also for destinations.
The first thing you need to do is to create the identifier for the port of Palermo.
The identifier are the first four letters of the name of the port, in uppercase.

Define the `Port.Identifier` constant to be a symbol with the value `:PALE`.
Define the `Port::IDENTIFIER` constant to be a symbol with the value `:PALE`.

```ruby
Port::Identifier
Port::IDENTIFIER
# => :PALE
```

Expand Down
3 changes: 2 additions & 1 deletion exercises/concept/port-palermo/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
]
},
"icon": "strings-package",
"blurb": "Learn about the symbols while helping out with modernize the ports of Palermo computer system."
"blurb": "Learn about the symbols while helping out with modernize the ports of Palermo computer system.",
"contributors": ["egemen-dev"]
}
2 changes: 1 addition & 1 deletion exercises/concept/port-palermo/.meta/exemplar.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Port
Identifier = :PALE
IDENTIFIER = :PALE

def self.get_identifier(city)
return city[0..3].upcase.to_sym
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/port-palermo/port_palermo.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Port
# TODO: define the 'Identifier' constant
# TODO: define the 'IDENTIFIER' constant

def self.get_identifier(city)
raise 'Please implement the Port.get_identifier method'
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/port-palermo/port_palermo_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class MoviegoerTest < Minitest::Test
def test_identifier
assert_equal :PALE, Port::Identifier
assert_equal :PALE, Port::IDENTIFIER
end

def test_get_identifier_for_hamburg
Expand Down

0 comments on commit f369455

Please sign in to comment.