RubyGems Navigation menu

conjugatefr 1.0.5

ABOUT

A simple program and library to conjugate french verbs. Parses responses to requests to an online reference site.

Executable

ConjugateFR comes with the executable binary conjugatefr. To view information about it’s supported arguments, run

conjugatefr --help

Custom Renderers

To make a custom renderer, just type

require conjugatefr/renderer

and then make a class that extends Renderer. An example is as follows:

require 'conjugatefr/renderer'
class ExampleRenderer < Renderer
  def pre
    puts "This goes before the words."
  end
  def word (name, words)
    print "#{name}:"
    words.each do |word|
      print " #{word}"
    end
  end
  def post
    puts "This goes after the words."
  end
  def description; "Renders an example format."; end
end
# Add to the Renderers list (For CLI and other programs that use it.)
$renderers["Example"] = ExampleRenderer.new

To try this out, save it as erend.rb and then run:

conjugatefr -R ./erend.rb -r Example

It will produce the output:

This goes before the words.
someword: someconjugation etc etc
... (more words will be here)
This goes after the words.

The Library

The library can be included with +require conjugatefr+. It includes the ConjugateFR class.

Gemfile:
= 複製 已複製

安裝:
=

版本列表:

  1. 1.0.5 - September 17, 2015 (7.5 KB)
  2. 1.0.4 - September 17, 2015 (7.5 KB)
  3. 1.0.3 - September 17, 2015 (7.5 KB)
  4. 1.0.2 - September 17, 2015 (7.5 KB)
  5. 1.0.0 - September 16, 2015 (6.0 KB)
顯示所有版本(共 6)

擁有者:

作者:

  • htmlguy

SHA 256 總和檢查碼:

6b0304f9bdbf461115b8fd024025a6a49ad24efde5c65eb3f4fde51383602b92

總下載次數 12,331

這個版本 3,127

授權:

Unlicense

Ruby 版本需求: >= 0

相關連結: