Class: Law::Japan::EGov

Inherits:
Object
  • Object
show all
Defined in:
lib/law/japan/e_gov.rb

Defined Under Namespace

Classes: Converter, Downloader

Constant Summary collapse

SourceDir =
File.join(Dir.home, ".law-japan")
HtmlRepoURL =
"[email protected]:riywo/law-japan-e_gov-html.git"
TextRepoURL =
"[email protected]:riywo/law-japan-e_gov-text.git"

Instance Method Summary collapse

Constructor Details

#initializeEGov

Returns a new instance of EGov.



12
13
14
# File 'lib/law/japan/e_gov.rb', line 12

def initialize
  FileUtils.mkdir_p SourceDir
end

Instance Method Details

#convert!Object



25
26
27
# File 'lib/law/japan/e_gov.rb', line 25

def convert!
  Converter.new(html_data_dir, text_data_dir).convert!
end

#download!Object



21
22
23
# File 'lib/law/japan/e_gov.rb', line 21

def download!
  Downloader.new(html_data_dir).download!
end

#update!Object



16
17
18
19
# File 'lib/law/japan/e_gov.rb', line 16

def update!
  html_git.pull
  text_git.pull
end