Module: Miu::Node::ClassMethods

Defined in:
lib/miu/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#specObject

Returns the value of attribute spec.



12
13
14
# File 'lib/miu/node.rb', line 12

def spec
  @spec
end

Instance Method Details

#description(value = nil) ⇒ Object



14
15
16
17
18
# File 'lib/miu/node.rb', line 14

def description(value = nil)
  @description ||= self.name
  @description = value if value
  @description
end

#register(*args, &block) ⇒ Object



20
21
22
23
24
25
# File 'lib/miu/node.rb', line 20

def register(*args, &block)
  options = Miu::Utility.extract_options!(args)
  name = args.shift
  node = args.shift || self
  Miu.register name, node, options, &block
end