Class: Trello::AssociationBuilder::HasOne
- Inherits:
-
Object
- Object
- Trello::AssociationBuilder::HasOne
- Defined in:
- lib/trello/association_builder/has_one.rb
Class Method Summary collapse
Class Method Details
.build(model_klass, name, options) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/trello/association_builder/has_one.rb', line 5 def build(model_klass, name, ) model_klass.class_eval do define_method(name) do |*args| has_one_fetcher = AssociationFetcher::HasOne.new(self, name, ) has_one_fetcher.fetch end end end |