Class: Jade::Frontend::ForwardDeclaration::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/jade/frontend/forward_declaration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#entryObject (readonly)

Returns the value of attribute entry

Returns:

  • (Object)

    the current value of entry



22
23
24
# File 'lib/jade/frontend/forward_declaration.rb', line 22

def entry
  @entry
end

#errorsObject (readonly)

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



22
23
24
# File 'lib/jade/frontend/forward_declaration.rb', line 22

def errors
  @errors
end

Instance Method Details

#add_errors(new_errors) ⇒ Object



23
24
25
# File 'lib/jade/frontend/forward_declaration.rb', line 23

def add_errors(new_errors)
  with(errors: errors + new_errors)
end

#to_resultObject



27
28
29
# File 'lib/jade/frontend/forward_declaration.rb', line 27

def to_result
  errors.empty? ? Ok[entry] : Err[errors]
end