Skip to content
/ mits Public

A Multifamily Information and Transactions Standard document parser

License

Notifications You must be signed in to change notification settings

utensils/mits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MITS

A SAX powered reader for Multifamily Information and Transactions Standard (MITS) compatible documents.

Currently supporting MITS 3.0 & 4.1 (default).

Gem Version Build Status Code Climate Coverage Status Dependency Status

Installation

gem install mits

Getting Started

Create a MITS::Document with a local filepath or URL:

document = MITS::Document.new('/example/path/mits_compatible_feed.xml', version: 3.0)

Iterating over properties is easy:

document.properties do |property|
  puts "#{property.name} now available online at #{property.website}"
end

The #properties method returns a Enumerator if no block is provided:

document.properties.each_with_object([]) do |property, arr|
  # Only include properties with 2 or more units
  arr.push(property) if property.units.size > 2
end

Contributing

Feedback, feature requests, and fixes are welcomed and encouraged. Please make appropriate use of Issues and Pull Requests. All code should have accompanying tests.

Author

MITS is written and maintained by @doomspork as part of CityLeash.com.

License

Please see LICENSE for licensing details.