lfa-wordpress-import/lib/wordpress/category.rb

18 lines
257 B
Ruby
Raw Normal View History

2014-03-04 22:47:53 +00:00
module WordPressImport
class Category
attr_accessor :name
2014-03-04 22:47:53 +00:00
def initialize(text)
@name = text
end
2014-03-04 22:47:53 +00:00
def ==(other)
name == other.name
end
2014-03-04 22:47:53 +00:00
def to_refinery
BlogCategory.find_or_create_by_title(name)
end
end
end