Skip to content
This repository has been archived by the owner on Aug 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from af83/force-downcase-transport_modes
Browse files Browse the repository at this point in the history
Force downcase on Line#transport_mode
  • Loading branch information
ldonnet authored Feb 14, 2019
2 parents e8e1808 + c400eab commit a377f3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/codifligne/line.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ def initialize params
instance_variable_set("@#{k}", v) unless v.nil?
end
end

def transport_mode
@transport_mode&.to_s&.downcase
end
end
end
1 change: 1 addition & 0 deletions spec/codifligne/codifligne_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@

expect(lines.count).to equal(382)
expect(lines.first).to be_a(Codifligne::Line)
expect(lines.first.transport_mode).to eq 'bus'
end

it 'should retrieve lines with Operator lines method' do
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/line.xml

Large diffs are not rendered by default.

0 comments on commit a377f3e

Please sign in to comment.