Mongomatic::Plugins::Accessors
matic_accessor is a plugin for Mongomatic so you can use dot-notation to access the documents
attributes
Usage
require 'matic_accessor'
class Monkey < Mongomatic::Base
include Mongomatic::Plugins::Accessors
matic_accessor :name, :nickname
matic_reader :age
matic_writer :weight
end
m = Monkey.new
m.name = 'funny'
m.nickname = 'bob'
m[:age] = 13
m.weight = 100
m.insert
m = Monkey.find_one
m.name # funny
m.nickname # bob
m.age # 13
m[:weight] # 100
Project
matic_accessor
Plugin for Mongomatic to provide dot-notation access to document attributes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
Development
Dependencies
Project Readme