Class: Angus::SDoc::JsonFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/angus/sdoc/json_formatter.rb

Class Method Summary collapse

Class Method Details

.format(x) ⇒ Object



7
8
9
10
11
# File 'lib/angus/sdoc/json_formatter.rb', line 7

def self.format(x)
  define_singleton_method("format_#{x}") do |y|
    JSON(send("#{x}_for_json", y))
  end
end