diff options
| author | Teddy Wing | 2017-06-15 14:49:34 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-15 14:49:34 +0200 |
| commit | 40b02ab0bdbf51ea4c9d3ebef26d880c789edf44 (patch) | |
| tree | b118ee690e838b0b0243f77a1fd91b9adcfdb304 /lib | |
| parent | 22b4146541ce721447b2364c390c2dfe1efae8ef (diff) | |
| download | chouette-core-40b02ab0bdbf51ea4c9d3ebef26d880c789edf44.tar.bz2 | |
Link: Change :name & :content into a single property :content
The only difference between :name and :content was that :name contained
a string and :content contained HTML. But they're really the same thing.
Thus it makes much more sense to combine those into a single property
that means both, and handles content regardless of type.
Refs #3479
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/link.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/link.rb b/lib/link.rb index 3ce12ae24..7683a808f 100644 --- a/lib/link.rb +++ b/lib/link.rb @@ -1,11 +1,10 @@ class Link - attr_reader :name, :href, :method, :data, :content + attr_reader :content, :href, :method, :data - def initialize(name: nil, href:, method: nil, data: nil, content: nil) - @name = name + def initialize(content: nil, href:, method: nil, data: nil) + @content = content @href = href @method = method @data = data - @content = content end end |
