Module: DocumentMapper::Document

Extended by:
ActiveSupport::Concern
Includes:
ActiveModel::AttributeMethods, AttributeMethods::Read, ToHtml, YamlParsing
Defined in:
lib/document_mapper/document.rb

Defined Under Namespace

Modules: ClassMethods

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from YamlParsing

#read_yaml, #yaml_load

Methods included from ToHtml

#to_html

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



11
12
13
# File 'lib/document_mapper/document.rb', line 11

def attributes
  @attributes
end

#contentObject

Returns the value of attribute content.



11
12
13
# File 'lib/document_mapper/document.rb', line 11

def content
  @content
end

Instance Method Details

#==(other_document) ⇒ Object



17
18
19
20
# File 'lib/document_mapper/document.rb', line 17

def ==(other_document)
  return false unless other_document.is_a? Document
  self.file_path == other_document.file_path
end