Class: Head::Wing

Inherits:
ApplicationComponent show all
Defined in:
app/components/head/wing.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationComponent

#initialize

Constructor Details

This class inherits a constructor from Head::ApplicationComponent

Class Method Details



16
17
18
# File 'app/components/head/wing.rb', line 16

def self.mainmenu
  new(id: :mainmenu)
end

Instance Method Details

#classesObject



21
22
23
# File 'app/components/head/wing.rb', line 21

def classes
  %W[c-head-wing c-head-wing--#{group} js-head-wing]
end

#groupObject



25
26
27
# File 'app/components/head/wing.rb', line 25

def group
  left? ? :left : :right
end

#left?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'app/components/head/wing.rb', line 29

def left?
  !right?
end

#right?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/components/head/wing.rb', line 33

def right?
  @right
end