Skip to content

Commit

Permalink
Add ruby generation as example (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: Stanislav (Stas) Katkov <github@skatkov.com>
  • Loading branch information
skatkov and Stanislav (Stas) Katkov authored Dec 27, 2024
1 parent f945f8e commit a3b937c
Show file tree
Hide file tree
Showing 5,615 changed files with 388,530 additions and 7 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
/tmp/
.vscode/
.DS_Store
// file is just to big.
example/ruby/index.csv
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "source_ruby"]
path = source_ruby
url = https://github.com/ruby/ruby
2 changes: 0 additions & 2 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
--load ./lib/yard-markdown.rb
--format markdown
--private
--protected
24 changes: 20 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,24 @@ end
task default: %i[test stree:write]


desc "Generate example/rdoc/ documentation using yard-markdown plugin"
task :generate_example do
sh "yardoc --output-dir example/rdoc example_rdoc.rb"
sh "yardoc --output-dir example/yard example_yard.rb"
namespace :examples do
desc "Generate example/rdoc/ documentation using yard-markdown plugin"
task :generate do
Rake::Task["examples:yard"].invoke
Rake::Task["examples:rdoc"].invoke
Rake::Task["examples:ruby"].invoke
end


task :yard do
sh "yardoc --output-dir example/yard example_yard.rb"
end

task :rdoc do
sh "yardoc --output-dir example/rdoc example_rdoc.rb"
end

task :ruby do
sh "yardoc source_ruby --output-dir example/ruby"
end
end
7 changes: 7 additions & 0 deletions example/ruby/A.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Class: A
**Inherits:** Object





6 changes: 6 additions & 0 deletions example/ruby/ACRONYM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Module: ACRONYM





22 changes: 22 additions & 0 deletions example/ruby/Action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Class: Action
**Inherits:** Object




# Attributes
## value[RW] [](#attribute-i-value)
Returns the value of attribute value.


#Instance Methods
## eql?(other) [](#method-i-eql?)

**@return** [Boolean]

## hash() [](#method-i-hash)

## initialize(value) [](#method-i-initialize)

**@return** [Action] a new instance of Action

26 changes: 26 additions & 0 deletions example/ruby/ActionFilter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Class: ActionFilter
**Inherits:** Object


ActionFilter is a base class for actions that are triggered by specs that
match the filter. The filter may be specified by strings that match spec
descriptions or by tags for strings that match spec descriptions.

Unlike TagFilter and RegexpFilter, ActionFilter instances do not affect the
specs that are run. The filter is only used to trigger the action.



#Instance Methods
## ===(string) [](#method-i-===)

## initialize(tagsnil, descsnil) [](#method-i-initialize)

**@return** [ActionFilter] a new instance of ActionFilter

## load() [](#method-i-load)

## register() [](#method-i-register)

## unregister() [](#method-i-unregister)

47 changes: 47 additions & 0 deletions example/ruby/ActionMap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Class: ActionMap
**Inherits:** Object




# Class Methods
## build_tree(rects ) [](#method-c-build_tree)
## each_firstbyte_range(prefix , region_rects ) [](#method-c-each_firstbyte_range)
## expand(rects , &block ) [](#method-c-expand)
## expand_rec(prefix , region_rects , &block ) [](#method-c-expand_rec)
## merge(*mappings , &block ) [](#method-c-merge)
## merge2(map1 , map2 , &block ) [](#method-c-merge2)
## merge_rects(*rects_list ) [](#method-c-merge_rects)
## parse(mapping ) [](#method-c-parse)
## parse_to_rects(mapping ) [](#method-c-parse_to_rects)
## unambiguous_action(actions0 ) [](#method-c-unambiguous_action)

#Instance Methods
## empty_action() [](#method-i-empty_action)

## format_infos(infos) [](#method-i-format_infos)

## format_offsets(min, max, offsets) [](#method-i-format_offsets)

## gen_str(bytes) [](#method-i-gen_str)

## generate_info(info) [](#method-i-generate_info)

## generate_lookup_node(name, table) [](#method-i-generate_lookup_node)

## generate_node(name_hintnil) [](#method-i-generate_node)

## gennode(bytes_code, words_code, name_hintnil) [](#method-i-gennode)

## initialize(tree) [](#method-i-initialize)

**@return** [ActionMap] a new instance of ActionMap

## inspect() [](#method-i-inspect)

## max_input_length() [](#method-i-max_input_length)

## max_input_length_rec(tree) [](#method-i-max_input_length_rec)

## str_name(bytes) [](#method-i-str_name)

Loading

0 comments on commit a3b937c

Please sign in to comment.