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

18 lines
245 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-11 19:03:51 +00:00
def to_rails
Tag.find_or_create_by_title(name)
end
end
end