From 40b02ab0bdbf51ea4c9d3ebef26d880c789edf44 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 15 Jun 2017 14:49:34 +0200 Subject: 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 --- lib/link.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3