Module: Leafy::Mixin::Poro::Schema::InstanceMethods

Defined in:
lib/leafy/mixin/poro/schema.rb

Instance Method Summary collapse

Instance Method Details

#leafy_fieldsObject



10
11
12
13
# File 'lib/leafy/mixin/poro/schema.rb', line 10

def leafy_fields
  data = _leafy_data
  Leafy::Schema.load(data.nil? ? "[]" : data)
end

#leafy_fields=(leafy_schema) ⇒ Object



15
16
17
# File 'lib/leafy/mixin/poro/schema.rb', line 15

def leafy_fields=(leafy_schema)
  self._leafy_data = ::Leafy::Schema.dump(leafy_schema)
end

#leafy_fields_attributes=(attributes_list) ⇒ Object



19
20
21
# File 'lib/leafy/mixin/poro/schema.rb', line 19

def leafy_fields_attributes=(attributes_list)
  self.leafy_fields = ::Leafy::Schema.new(attributes_list)
end