Class: Herb::ActionView::HelperArgument

Inherits:
Object
  • Object
show all
Defined in:
lib/herb/action_view/helper_registry.rb,
sig/herb/action_view/helper_registry.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, position, type, optional, default, splat, description) ⇒ HelperArgument

: (String, Integer, String, bool, String?, bool, String) -> void

Parameters:

  • (String)
  • (Integer)
  • (String)
  • (Boolean)
  • (String, nil)
  • (Boolean)
  • (String)


509
510
511
512
513
514
515
516
517
# File 'lib/herb/action_view/helper_registry.rb', line 509

def initialize(name, position, type, optional, default, splat, description)
  @name = name
  @position = position
  @type = type
  @optional = optional
  @default = default
  @splat = splat
  @description = description
end

Instance Attribute Details

#defaultString? (readonly)

: String?

Returns:

  • (String, nil)


505
506
507
# File 'lib/herb/action_view/helper_registry.rb', line 505

def default
  @default
end

#descriptionString (readonly)

: String

Returns:

  • (String)


506
507
508
# File 'lib/herb/action_view/helper_registry.rb', line 506

def description
  @description
end

#nameString (readonly)

: String

Returns:

  • (String)


502
503
504
# File 'lib/herb/action_view/helper_registry.rb', line 502

def name
  @name
end

#positionInteger (readonly)

: Integer

Returns:

  • (Integer)


503
504
505
# File 'lib/herb/action_view/helper_registry.rb', line 503

def position
  @position
end

#typeString (readonly)

: String

Returns:

  • (String)


504
505
506
# File 'lib/herb/action_view/helper_registry.rb', line 504

def type
  @type
end

Instance Method Details

#optional?Boolean

: () -> bool

Returns:

  • (Boolean)


520
# File 'lib/herb/action_view/helper_registry.rb', line 520

def optional? = @optional

#splat?Boolean

: () -> bool

Returns:

  • (Boolean)


523
# File 'lib/herb/action_view/helper_registry.rb', line 523

def splat? = @splat