Class: AppCommand::Export

Inherits:
Convoy::ActionCommand::Base
  • Object
show all
Defined in:
lib/routes/export.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/routes/export.rb', line 5

def execute

    begin

        @opts = command_options
        @args = arguments

        @site = Blufin::SiteResolver::validate_site(@args[0])
        @error_handler = Blufin::YmlErrorHandler.new(@site)

        opts_validate
        opts_routing

    rescue => e

        Blufin::Terminal::print_exception(e)

    end

end

#maven_appObject



47
48
49
50
51
52
# File 'lib/routes/export.rb', line 47

def maven_app

    yml_maven = Blufin::YmlMavenValidator.new(@site, @error_handler)
    yml_maven.data_app

end

#maven_blufinObject



40
41
42
43
44
45
# File 'lib/routes/export.rb', line 40

def maven_blufin

    yml_maven = Blufin::YmlMavenValidator.new(@site, @error_handler)
    yml_maven.data_blufin

end

#opts_routingObject



33
34
35
36
37
38
# File 'lib/routes/export.rb', line 33

def opts_routing

    puts maven_blufin.inspect if @opts[:maven_blufin]
    puts maven_app.inspect if @opts[:maven_app]

end

#opts_validateObject



26
27
28
29
30
31
# File 'lib/routes/export.rb', line 26

def opts_validate

    Blufin::Routes::at_least_one_flag(@opts)
    Blufin::Routes::max_one_flag(@opts)

end