class Hippo::Command::GenerateScreen
Constants
- OPTIONS
Attributes
screen_class[R]
screen_id[R]
Public Instance Methods
add_definition()
click to toggle source
# File lib/hippo/command/generate_screen.rb, line 31 def add_definition insert_into_file "config/screens.rb", :after => /Hippo::Screen.for_extension.*?\n/ do source = File.expand_path(find_in_source_paths("config/screen.rb")) ERB.new(::File.binread(source), nil, "-","@output_buffer").result(binding) end end
create_screen()
click to toggle source
# File lib/hippo/command/generate_screen.rb, line 26 def create_screen template "client/screens/screen.jsx", "#{client_dir}/screens/#{screen_id}.jsx" template "spec/client/screen.spec.jsx", "spec/client/screens/#{screen_id}.spec.jsx" end
set_variables()
click to toggle source
Calls superclass method
# File lib/hippo/command/generate_screen.rb, line 19 def set_variables super options[:title] = name.titleize if options[:title].blank? @screen_id = class_name.underscore.dasherize @screen_class = class_name end