diff options
Diffstat (limited to 'lib/sisu/hub_actions.rb')
-rw-r--r-- | lib/sisu/hub_actions.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/sisu/hub_actions.rb b/lib/sisu/hub_actions.rb index 52ad9da6..a946591d 100644 --- a/lib/sisu/hub_actions.rb +++ b/lib/sisu/hub_actions.rb @@ -382,6 +382,22 @@ module SiSU_Hub_Actions end end end + def json? + if @opt.act[:json][:set]==:on #% --js, -J + if @opt.f_pths.length > 0 + require_relative 'json' # json.rb + SiSU_JSON::Source.new(@opt).read + else + msg='json request requires sisu markup files' + if (@opt.act[:verbose_plus][:set]==:on \ + || @opt.act[:maintenance][:set]==:on) + SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:yellow). + mark(msg) + else puts msg + end + end + end + end def xhtml? if @opt.act[:xhtml][:set]==:on #% --xhtml, -b if @opt.f_pths.length > 0 |