Class: Boolean

Inherits:
BasicObject
Extended by:
Icss::Meta::BooleanSchema
Defined in:
lib/icss/type.rb,
lib/icss/type/simple_types.rb,
lib/icss/type/simple_types.rb

Overview

full definitions in type/simple_types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Icss::Meta::BooleanSchema

fullname, receive

Methods included from Icss::Meta::PrimitiveSchema

#doc, #doc=, #to_schema

Constructor Details

#initialize(val = nil) ⇒ Boolean

Returns a new instance of Boolean.



47
48
49
# File 'lib/icss/type/simple_types.rb', line 47

def initialize(val=nil)
  self.val = val
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



51
52
53
# File 'lib/icss/type/simple_types.rb', line 51

def method_missing(meth, *args)
  val.send(meth, *args)
end

Instance Attribute Details

#valObject

Returns the value of attribute val.



46
47
48
# File 'lib/icss/type/simple_types.rb', line 46

def val
  @val
end

Class Method Details

.methodsObject



50
# File 'lib/icss/type/simple_types.rb', line 50

def self.methods() ::TrueClass.methods | ::Icss::Meta::BooleanSchema.instance_methods ; end

Instance Method Details

#!Object



61
# File 'lib/icss/type/simple_types.rb', line 61

def !()           (! val)          ; end

#!=(other_val) ⇒ Object



63
# File 'lib/icss/type/simple_types.rb', line 63

def !=(other_val) val != other_val ; end

#==(other_val) ⇒ Object



62
# File 'lib/icss/type/simple_types.rb', line 62

def ==(other_val) val == other_val ; end

#classObject



60
# File 'lib/icss/type/simple_types.rb', line 60

def class()   ::Boolean          ; end

#inspectObject



57
58
59
# File 'lib/icss/type/simple_types.rb', line 57

def inspect()
  "<Boolean #{val.inspect}>"
end

#respond_to?(meth) ⇒ Boolean

Returns:



54
55
56
# File 'lib/icss/type/simple_types.rb', line 54

def respond_to?(meth)
  super(meth) || val.respond_to?(meth)
end

#try_dupObject



64
# File 'lib/icss/type/simple_types.rb', line 64

def try_dup() ::Boolean.new(val) ; end