Class: Mxrb::RubyApp::Page

Inherits:
Object
  • Object
show all
Defined in:
lib/mxrb/ruby_app.rb

Overview

Page metadata remains ordinary Ruby while the browser receives its JSON projection from the integrated backend.

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.appearance_classObject (readonly)

Returns the value of attribute appearance_class.



305
306
307
# File 'lib/mxrb/ruby_app.rb', line 305

def appearance_class
  @appearance_class
end

.appearance_styleObject (readonly)

Returns the value of attribute appearance_style.



305
306
307
# File 'lib/mxrb/ruby_app.rb', line 305

def appearance_style
  @appearance_style
end

.data_sourceObject (readonly)

Returns the value of attribute data_source.



305
306
307
# File 'lib/mxrb/ruby_app.rb', line 305

def data_source
  @data_source
end

.mendix_idObject (readonly)

Returns the value of attribute mendix_id.



305
306
307
# File 'lib/mxrb/ruby_app.rb', line 305

def mendix_id
  @mendix_id
end

.titleObject (readonly)

Returns the value of attribute title.



305
306
307
# File 'lib/mxrb/ruby_app.rb', line 305

def title
  @title
end

.widgetsObject (readonly)

Returns the value of attribute widgets.



305
306
307
# File 'lib/mxrb/ruby_app.rb', line 305

def widgets
  @widgets
end

Class Method Details

.configure(title:, widgets: [], appearance_class: '', appearance_style: '', data_source: nil) ⇒ Object



316
317
318
319
320
321
322
# File 'lib/mxrb/ruby_app.rb', line 316

def configure(title:, widgets: [], appearance_class: '', appearance_style: '', data_source: nil)
  @title = title.to_s
  @widgets = widgets.freeze
  @appearance_class = appearance_class.to_s
  @appearance_style = appearance_style.to_s
  @data_source = data_source
end

.mendix_name(value = nil, id: nil) ⇒ Object



308
309
310
311
312
313
314
# File 'lib/mxrb/ruby_app.rb', line 308

def mendix_name(value = nil, id: nil)
  return @mendix_name unless value

  @mendix_name = value.to_s
  @mendix_id = id.to_s
  Registry.register(:page, @mendix_name, self)
end