wordpress-import/lib/wordpress/category.rb

18 lines
257 B
Ruby

module WordPressImport
class Category
attr_accessor :name
def initialize(text)
@name = text
end
def ==(other)
name == other.name
end
def to_refinery
BlogCategory.find_or_create_by_title(name)
end
end
end