Class: Mxrb::Dsl::NavigationBuilder

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

Instance Method Summary collapse

Constructor Details

#initializeNavigationBuilder

Returns a new instance of NavigationBuilder.



526
527
528
# File 'lib/mxrb/dsl/builder.rb', line 526

def initialize
  @profiles = []
end

Instance Method Details

#profile(name, home_page: nil, home_microflow: nil, sign_in_page: nil, menu: nil, role_homes: {}, offline: false, kind: nil, app_title: nil, app_icon: nil, &block) ⇒ Object



530
531
532
533
534
535
536
537
538
539
# File 'lib/mxrb/dsl/builder.rb', line 530

def profile(name, home_page: nil, home_microflow: nil, sign_in_page: nil,
            menu: nil, role_homes: {}, offline: false, kind: nil,
            app_title: nil, app_icon: nil, &block)
  profile = NavigationProfileBuilder.new(
    name, home_page:, home_microflow:, sign_in_page:, menu:, role_homes:,
          offline:, kind:, app_title:, app_icon:
  )
  profile.instance_eval(&block) if block
  @profiles << profile.to_h
end

#to_hObject



541
542
543
# File 'lib/mxrb/dsl/builder.rb', line 541

def to_h
  { profiles: @profiles }
end