Class: PageEz::Parameters::Parameter

Inherits:
Object
  • Object
show all
Defined in:
lib/page_ez/parameters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, name) ⇒ Parameter

Returns a new instance of Parameter.



44
45
46
47
# File 'lib/page_ez/parameters.rb', line 44

def initialize(type, name)
  @type = type
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



42
43
44
# File 'lib/page_ez/parameters.rb', line 42

def name
  @name
end

Instance Method Details

#kwarg?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/page_ez/parameters.rb', line 49

def kwarg?
  @type == :keyreq || @type == :key
end