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.



557
558
559
# File 'lib/mxrb/dsl/builder.rb', line 557

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



561
562
563
564
565
566
567
568
569
570
# File 'lib/mxrb/dsl/builder.rb', line 561

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



572
573
574
# File 'lib/mxrb/dsl/builder.rb', line 572

def to_h
  { profiles: @profiles }
end