lib/octopress-ink/assets/page.rb in octopress-ink-1.0.0.rc.49 vs lib/octopress-ink/assets/page.rb in octopress-ink-1.0.0.rc.50
- old
+ new
@@ -4,11 +4,11 @@
module Octopress
module Ink
module Assets
class PageAsset < Asset
attr_reader :filename
- attr_accessor :data, :permalink_name, :cloned, :clone_of
+ attr_accessor :data, :permalink_name
def initialize(plugin, base, file)
@root = plugin.assets_path
@plugin = plugin
@base = base
@@ -29,18 +29,10 @@
plugin.config['permalinks'] ||= {}
permalink_config ||= page.url
end
end
- def clone(data={})
- self.cloned = true
- p = PageAsset.new(plugin, base, file)
- p.clone_of = self
- p.data = data
- p
- end
-
def merge_data(data={})
page.data.merge!(data)
end
def deep_merge(data={})
@@ -66,26 +58,12 @@
else
permalink = page.data['permalink']
end
page.data.merge!(@data)
+ page.plugin = plugin
page
- end
- end
-
- def info
- message = super
- return message if disabled?
-
- if clone_of
- " #{permalink}"
- elsif cloned
- message << "\n #{permalink}"
- else
- name = permalink_name << page.ext
- message.sub!(/#{filename}\s*/, name.ljust(35))
- message.ljust(25) << permalink
end
end
def permalink
page.url