Skip to content

Solved: Error: in start_tag': undefined method []' for nil:NilClass (NoMethodError) #11

@JohnBat26

Description

@JohnBat26

This is my code:

require 'maroon/kernel'
require 'build'

module Demands

  Context.define :DemandProcessing do

    def initialize(demand, requied_organization, params)
      @demand = demand
      @requied_organization = requied_organization
      @params = params
    end

    role :demand do
      def withdraw(amount)
        source.movement(amount)
        source.log 'withdrawal ' + amount.to_s
      end
    end

    role :requied_organization do
      def find_or_create(params)
      #...
     end
    end

   def process
     organization, status = requied_organization.find_or_create(params)
     return status
   end
end

demand = Demand.new
required_organization = Organization.new
ctx = Demands::DemandsProcessing.new(demand, required_organization)
ctx.process

And I get next error:
/home/johnbat26/.rvm/gems/ruby-2.0.0-p247@wc/gems/sourcify-0.5.0/lib/sourcify/proc/scanner/dstring.rb:49:in start_tag': undefined method[]' for nil:NilClass (NoMethodError)
from /home/johnbat26/.rvm/gems/ruby-2.0.0-p247@wc/gems/sourcify-0.5.0/lib/sourcify/proc/scanner/dstring.rb:53:in `end_tag'

Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions