Class: Eco::API::Session::Config::ApiDefChain

Inherits:
Struct
  • Object
show all
Defined in:
lib/eco/api/session/config.rb

Session and API collapse

Session and API collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



100
101
102
# File 'lib/eco/api/session/config.rb', line 100

def name
  @name
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



100
101
102
# File 'lib/eco/api/session/config.rb', line 100

def params
  @params
end

#rootObject

Returns the value of attribute root

Returns:

  • (Object)

    the current value of root



100
101
102
# File 'lib/eco/api/session/config.rb', line 100

def root
  @root
end

Instance Method Details

#add_space(space, **kargs, &block) ⇒ Object



101
102
103
104
# File 'lib/eco/api/session/config.rb', line 101

def add_space(space, **kargs, &block)
  kargs = (params || {}).merge(kargs).merge(space: space)
  root.add_api(name, **kargs, &block)
end