Class: Devkitkat::Service::PredefinedCommand::Pull

Inherits:
Base
  • Object
show all
Defined in:
lib/devkitkat/service/predefined_command/pull.rb

Instance Attribute Summary

Attributes included from Concerns::ServiceInitializer

#service

Instance Method Summary collapse

Methods included from Concerns::ServiceInitializer

#initialize

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/devkitkat/service/predefined_command/pull.rb', line 13

def available?
  service.repo_defined?
end

#machine_driverObject



17
18
19
# File 'lib/devkitkat/service/predefined_command/pull.rb', line 17

def machine_driver
  'none'
end

#to_scriptObject



5
6
7
8
9
10
11
# File 'lib/devkitkat/service/predefined_command/pull.rb', line 5

def to_script
  <<~EOS
    cd #{service.src_dir}
    git checkout master
    git pull origin master
  EOS
end