undefined method `blueprint' for CreditModel:Module (NoMethodError)

16 views
Skip to first unread message

Robert Meyer

unread,
Dec 11, 2013, 1:56:57 PM12/11/13
to machini...@googlegroups.com
I am attempting to use

require 'machinist'

module CreditModel
  extend Machinist::Machinable

..............

end

and in the blueprint file:

  CreditModel.blueprint do
    version           { ["1.7.3", "2.0.1", "1.6.1"].sample }
    processor         { "CreditModel::Processor::Rserver" }
    processor_params  { { "score_formula" => "score" } }
    credit_model_data_source_queries do
      [CreditModelDataSourceQuery.make!]
    end
  end

This throws the error : undefined method `blueprint' for CreditModel:Module (NoMethodError) everytime. Anyone have suggestions?



Pete Yandell

unread,
Dec 11, 2013, 5:24:02 PM12/11/13
to machini...@googlegroups.com
I can see why it doesn't work: you're trying to use Machinist on a module.

Assuming it worked, what would you expect it to do? Given that Machinist's job is to construct instances of classes, and there's no such thing as an instance of a module, what behaviour are you looking for?
Reply all
Reply to author
Forward
0 new messages