Class: RPV::Generators::Swing::ViewGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/rpv/generators/swing/view_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeViewGenerator

Returns a new instance of ViewGenerator.



12
13
14
# File 'lib/rpv/generators/swing/view_generator.rb', line 12

def initialize
  @template_path = File.dirname(__FILE__) + '/templates/view'
end

Class Method Details

.describeObject



23
24
25
# File 'lib/rpv/generators/swing/view_generator.rb', line 23

def self.describe
  "creates a swing view"
end

Instance Method Details

#parse_argsObject



16
17
18
19
20
21
# File 'lib/rpv/generators/swing/view_generator.rb', line 16

def parse_args
  @arguments[:base_class] ||= "frame"
  @arguments[:base_class] = "RPV::Swing::" + (@arguments[:base_class].underscore + "_view").camelize
  @arguments[:name] = @arguments[:name].underscore + "_view"
  @arguments[:class_name] = @arguments[:name].camelize
end