module ViewData::PG::Controls::JSON

Public Class Methods

data() click to toggle source
# File lib/view_data/pg/controls/json.rb, line 5
def self.data
  {
    'someString' => 'some-string',
    'someNumber' => 1,
    'someList' => ['a', 'b', 'c'],
    'someNestedObject' => {
      'someNestedAttribute' => 'some-nested-value'
    }
  }
end
text() click to toggle source
# File lib/view_data/pg/controls/json.rb, line 16
def self.text
  ::JSON.generate(data)
end