Class: WordnetJapanDiagram::CommandOptions
- Inherits:
-
Object
- Object
- WordnetJapanDiagram::CommandOptions
- Defined in:
- lib/wordnet_japan_diagram/command_options.rb
Instance Method Summary collapse
- #diagram_creater_options ⇒ Object
- #graph_viz_options ⇒ Object
-
#initialize(options:) ⇒ CommandOptions
constructor
A new instance of CommandOptions.
- #wordnet_japan_db_options ⇒ Object
Constructor Details
#initialize(options:) ⇒ CommandOptions
Returns a new instance of CommandOptions.
5 6 7 |
# File 'lib/wordnet_japan_diagram/command_options.rb', line 5 def initialize(options:) @options = end |
Instance Method Details
#diagram_creater_options ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/wordnet_japan_diagram/command_options.rb', line 15 def { search_word: @options[:search_word], output_diagram_path: @options[:output_diagram_path], node_contents: @options[:node_contents], height_from_target: @options[:height_from_target].nil? ? nil : @options[:height_from_target].to_i, depth_from_target: @options[:depth_from_target].nil? ? nil : @options[:depth_from_target].to_i } end |
#graph_viz_options ⇒ Object
25 26 27 28 29 |
# File 'lib/wordnet_japan_diagram/command_options.rb', line 25 def { rankdir: @options[:graph_rankdir].to_sym } end |
#wordnet_japan_db_options ⇒ Object
9 10 11 12 13 |
# File 'lib/wordnet_japan_diagram/command_options.rb', line 9 def { database: @options[:wordnet_japan_db_file_path] } end |