Vote count: 0 Let me try to explain what I need, then maybe someone may tell me how to do it. I have a series of entities in my system. They are listed in an array @entities = [ :component, :email, :form, :library, :page, :project, :resource, :template ] I parse a command line using Slop gem, then I get all parsed options in the opts hash and the remaining command line parameters in the args array. The first element of args array is always the entity I need to create to haldle the command line inputs. Let's assume, for the sake of this reasoning, that I'm creating a :project. Now, I have a file project.rb, which contains: entity_block = lambda { |ent| ent.entity_type = :project # All other i...
ادامه مطلب