Class: Ast::Crispr::Adapters::Null

Inherits:
Object
  • Object
show all
Defined in:
lib/ast/crispr.rb

Instance Method Summary collapse

Instance Method Details

#comment_region_text(document, comment_region) ⇒ Object

Raises:



699
700
701
702
# File 'lib/ast/crispr.rb', line 699

def comment_region_text(document, comment_region)
  raise Error.new('A CRISPR document adapter is required',
                  details: { source_label: document.source_label, comment_region: comment_region.inspect })
end

#comment_regions_for(document, owner, region: :leading, owner_scope: :shared_default) ⇒ Object

Raises:



691
692
693
694
695
696
697
# File 'lib/ast/crispr.rb', line 691

def comment_regions_for(document, owner, region: :leading, owner_scope: :shared_default)
  raise Error.new(
    'A CRISPR document adapter is required',
    details: { source_label: document.source_label, owner: owner.inspect, region: region,
               owner_scope: owner_scope }
  )
end

#read_ast(document) ⇒ Object

Raises:



682
683
684
# File 'lib/ast/crispr.rb', line 682

def read_ast(document)
  raise Error.new('A CRISPR document adapter is required', details: { source_label: document.source_label })
end

#structural_owners(document, owner_scope: :shared_default) ⇒ Object

Raises:



686
687
688
689
# File 'lib/ast/crispr.rb', line 686

def structural_owners(document, owner_scope: :shared_default)
  raise Error.new('A CRISPR document adapter is required',
                  details: { source_label: document.source_label, owner_scope: owner_scope })
end

#structure_profile(owner_scope: :shared_default) ⇒ Object



704
705
706
707
708
709
710
# File 'lib/ast/crispr.rb', line 704

def structure_profile(owner_scope: :shared_default)
  StructureProfile.new(
    owner_scope: owner_scope,
    owner_selector: owner_scope,
    metadata: { source: :null_adapter }
  )
end