wordpress-import/lib/wordpress/category.rb

18 lines
251 B
Ruby
Raw Normal View History

module WordPress
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