Sha256: 9cfed2d91a4c773196dc0f56db55dd1af7dd547dba5b601044701a287ede855d

Contents?: true

Size: 444 Bytes

Versions: 30

Compression:

Stored size: 444 Bytes

Contents

class TextFilter
  include Simpleton
  include Annotatable
  
  annotate :filter_name, :description
   
  def filter(text)
    text
  end
  
  class << self
    def inherited(subclass)
      subclass.filter_name = subclass.name.to_name('Filter')
    end
    
    def filter(text)
      instance.filter(text)
    end
    
    def description_file(filename)
      text = File.read(filename) rescue ""
      self.description text
    end
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 app/models/text_filter.rb
radiantcms-couchrest_model-0.2.2 app/models/text_filter.rb
radiantcms-couchrest_model-0.2.1 app/models/text_filter.rb
radiantcms-couchrest_model-0.2 app/models/text_filter.rb
radiantcms-couchrest_model-0.1.9 app/models/text_filter.rb
radiantcms-couchrest_model-0.1.8 app/models/text_filter.rb
radiantcms-couchrest_model-0.1.7 app/models/text_filter.rb
radiantcms-couchrest_model-0.1.6 app/models/text_filter.rb
radiantcms-couchrest_model-0.1.5 app/models/text_filter.rb
radiantcms-couchrest_model-0.1.4 app/models/text_filter.rb
radiant-0.7.2 app/models/text_filter.rb
radiant-0.9.1 app/models/text_filter.rb
radiant-0.8.2 app/models/text_filter.rb
radiant-0.9.0.rc2 app/models/text_filter.rb
radiant-rc-0.9.0 app/models/text_filter.rb
radiant-0.8.1 app/models/text_filter.rb
radiant-0.6.0 app/models/text_filter.rb
radiant-0.6.1 app/models/text_filter.rb
radiant-0.6.2 app/models/text_filter.rb
radiant-0.6.3 app/models/text_filter.rb