Class: Rice::Doc::Rice

Inherits:
Object
  • Object
show all
Defined in:
lib/rice/doc/rice.rb

Constant Summary collapse

ROOT =
"https://ruby-rice.github.io/4.x"
CLASS_DOCS =
{
  /^Rice::Buffer/ => "ruby_api/buffer",
  /^Rice::Pointer/ => "ruby_api/pointer",
  /^Rice::Reference/ => "ruby_api/reference"
}

Instance Method Summary collapse

Instance Method Details

#attribute_url(klass, native) ⇒ Object



45
46
47
# File 'lib/rice/doc/rice.rb', line 45

def attribute_url(klass, native)
  nil
end

#class_url(klass) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/rice/doc/rice.rb', line 12

def class_url(klass)
  CLASS_DOCS.each do |pattern, path|
    if klass.name.match?(pattern)
      return "#{ROOT}/#{path}"
    end
  end
  nil
end

#enum_url(klass) ⇒ Object



29
30
31
# File 'lib/rice/doc/rice.rb', line 29

def enum_url(klass)
  nil
end

#enum_value_url(klass, enum_value) ⇒ Object



33
34
35
# File 'lib/rice/doc/rice.rb', line 33

def enum_value_url(klass, enum_value)
  nil
end

#method_url(klass, native) ⇒ Object



41
42
43
# File 'lib/rice/doc/rice.rb', line 41

def method_url(klass, native)
  class_url(klass)
end

#module_url(klass) ⇒ Object



21
22
23
# File 'lib/rice/doc/rice.rb', line 21

def module_url(klass)
  nil
end

#singleton_method_url(klass, native) ⇒ Object



37
38
39
# File 'lib/rice/doc/rice.rb', line 37

def singleton_method_url(klass, native)
  nil
end

#union_url(klass) ⇒ Object



25
26
27
# File 'lib/rice/doc/rice.rb', line 25

def union_url(klass)
  nil
end