Class: WidgetBase

Inherits:
Object
  • Object
show all
Defined in:
lib/domain/widget_base.rb

Overview

Widget Base class containing widget object

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#widgetObject

Returns the value of attribute widget.



7
8
9
# File 'lib/domain/widget_base.rb', line 7

def widget
  @widget
end

Instance Method Details

#to_json(*data) ⇒ Json

Converts Widget object to Json object

Parameters:

  • *data (Refrence)

    widget object refrence

Returns:

  • (Json)

    Json represenatation of widget object



16
17
18
19
20
# File 'lib/domain/widget_base.rb', line 16

def to_json(*data)
  {
    widget: @widget
  }.to_json(*data)
end