Skip to content

Commit

Permalink
remove duplicate accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 5, 2013
1 parent 5aee071 commit 9517223
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 0 additions & 4 deletions misc/style/gfm/gfm_style.rb
Expand Up @@ -38,10 +38,6 @@ class GfmSection
include SectionBase include SectionBase
include Twitter::Autolink include Twitter::Autolink


attr_reader :subtitle, :author
attr_reader :categories, :stripped_subtitle
attr_reader :subtitle_to_html, :stripped_subtitle_to_html, :body_to_html

def initialize(fragment, author = nil) def initialize(fragment, author = nil)
@author = author @author = author
@subtitle, @body = fragment.split(/\n/, 2) @subtitle, @body = fragment.split(/\n/, 2)
Expand Down
5 changes: 5 additions & 0 deletions tdiary/diary_base.rb
Expand Up @@ -4,6 +4,11 @@
# #
module TDiary module TDiary
module SectionBase module SectionBase

attr_reader :subtitle, :author
attr_reader :categories, :stripped_subtitle
attr_reader :subtitle_to_html, :stripped_subtitle_to_html, :body_to_html

def body def body
@body.dup @body.dup
end end
Expand Down
4 changes: 0 additions & 4 deletions tdiary/style/wiki_style.rb
Expand Up @@ -16,10 +16,6 @@ module TDiary
class WikiSection class WikiSection
include SectionBase include SectionBase


attr_reader :subtitle, :author
attr_reader :categories, :stripped_subtitle
attr_reader :subtitle_to_html, :stripped_subtitle_to_html, :body_to_html

def initialize( fragment, author = nil ) def initialize( fragment, author = nil )
@author = author @author = author
if fragment[0] == ?! then if fragment[0] == ?! then
Expand Down

0 comments on commit 9517223

Please sign in to comment.